Jetijs Posted February 9, 2004 Report Share Posted February 9, 2004 ir db kuraa ir virsraksti un teksti, vajag lai tiktu izvadiiti virsraksti un lai virsraksts vienlaiciigi buutu arii kaa mainiigais hidden formaa, un katram virsrakstam blakus poga, kuru nospiezot notiek sleeptaa mainiigaa nodoshana uz attieciigu lapu. Itkaa jau nekas iipashs, bet nu man kaukas neshtimm, jo to mysql_fetch_array funkciju veel kaartiigi neizprotu :( Link to comment Share on other sites More sharing options...
CryRat Posted February 9, 2004 Report Share Posted February 9, 2004 lasīt mākam ? nu ta tik uz priekšu ;) vobšem cik tālu tiki ? pieslēdzies DB ? selectēji ko vajag ? mysql_fetch_array paņēmi ? tjipa vienkārš piemērs <? mysql_select_db($db_name, mysql_connect($db_host, $db_user, $db_pass)); $result = mysql_query("SELECT `id`, `name` FROM `mytable`"); while ($row = mysql_fetch_array($result)) echo $row['id']." - ".$row['name']; ?> Link to comment Share on other sites More sharing options...
Kikko Posted February 9, 2004 Report Share Posted February 9, 2004 (edited) Tu gan lieki sarežģī sev dzīvi, bet šitam vajadzētu strādāt. <?php //Pievienojies datubāzei, rezultāts -> $dblink //Izpildi queriju (id, virsraksts), rezultāts -> $result $aff_rows = mysql_affected_rows($result); for ($loop=0; $loop < $aff_rows; $loop++) { $row = mysql_fetch_assoc($result) echo $row['virsraksts'] . '\n'; echo "<form action=\"skripts.php\" method=\"post\" enctype=\"multipart/form-data\">\n"; echo "<input type=\"hidden\" name=\"id\" value=\"$row['id']\"></input>\n"; echo "<input type=\"submit\" value=\"lasīt tālāk\"></input>\n"; echo "</form>\n<br>\n"; }; ?> Edited February 9, 2004 by Kikko Link to comment Share on other sites More sharing options...
Recommended Posts