laucinieks Posted December 13, 2010 Report Share Posted December 13, 2010 (edited) Pēc šī koda - echo '<td><a href="admin_lv.php?action=edit&id='.$row['id'].'">Labot</a></td>'; { $id = $_GET['id']; $sql = sprintf('update zinas set nosaukums = "%s", teksts = "%s" where id = %s', $_POST['nosaukums'], $_POST['teksts'], $id); mysql_query($sql) or die(mysql_error()); } if ($_GET['action'] == 'edit') { $id = (int)$_GET['id']; $sql = 'select * from zinas where id = '.$id; $data = mysql_query($sql); $row = mysql_fetch_array($data); Parādās tikai nosaukums, bet ir vajadzīgs, lai parādītos arī teksts. Kāpēc man neparādās teksts? EDIT: izlaboju pats, biju ielaidis kļūdu HTML kodā, var vērt ciet. Edited December 13, 2010 by laucinieks 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.