drellout Posted July 4, 2010 Report Share Posted July 4, 2010 Es taisu webu un izdomaju visus datus saglabat mysql (navigacijas linkus, blokus, footeri u.t.t) Lai citiem lietotajiem butu vieglak visu izlabot... Protams klat naks ari edit/delete/add sadaljas Rekur kods: <div id="sidebar_one"> <?php # te liekam sidebar_one linkus caur mysql !!! $result = mysql_query("SELECT * FROM sidebar_one"); while($row = mysql_fetch_array($result)) { echo "<h3>"; echo $row[title]; echo "</h3>"; echo "<p class='content'>"; echo $row[file]; echo "</p>"; } ?> </div> Jautajums ir tads vai tas ir riskanti ? Vai varees kads uzlauzt add/edit/delete tas lapas un saspamot pilnu mysql ? Un kaa droshak tados gadijumos to visu darit ? Un vel jaut kaa varetu samazinat sho echo skaitu ? Paldies. Nebljaujiet !! Jauninjais :D Quote Link to comment Share on other sites More sharing options...
drellout Posted July 4, 2010 Author Report Share Posted July 4, 2010 nojaušu ka formos vajadzēs lietot to mysql real escape vai kas tāds :) Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 4, 2010 Report Share Posted July 4, 2010 Pēc manām domām, šādi būtu labāk... =) echo " <h3> {$row['title']} </h3> <p class='content'> {$row['file']} </p> "; Quote Link to comment Share on other sites More sharing options...
drellout Posted July 4, 2010 Author Report Share Posted July 4, 2010 Pēc manām domām, šādi būtu labāk... =) echo " <h3> {$row['title']} </h3> <p class='content'> {$row['file']} </p> "; Paldies, cepums ;) Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted July 5, 2010 Report Share Posted July 5, 2010 echo HTML sux ass :( <h3><?php echo $title; ?></h3> <p class="content"> <?php echo $file; ?> </p> + forshaak ir glabaat taadas lietas vienaa tabulaa ar key-option struktuuru IMO. Ljaus vieglaak taisiit jaunus dinamiskos blokus, Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 5, 2010 Report Share Posted July 5, 2010 echo HTML sux ass :( Kāpēc tad tā? Quote Link to comment Share on other sites More sharing options...
Maris-S Posted July 5, 2010 Report Share Posted July 5, 2010 (edited) Man arī ne visai patīk izvadīt htmlu ar php, viens no iemesliem ir ērtība, nav sintakses iekrāsošanas, kad vajag lielus gabalus tādā veidā izvadīt esmu pat output buferus izmantojis, lai izveidotu stringu, kas tiks izvadīts. Savādāk kad pie lieliem koda gabaliem atgriezies pēc laika tajā putrā nav tik vienkārši tikt skaidrībā. Edited July 5, 2010 by Maris-S Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted July 5, 2010 Report Share Posted July 5, 2010 (edited) tapeec ka kods nav nodaliits no izskata + gruuti uzturams + sintakses hailaitoshana nedarbojas ^_^ Edited July 5, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.