<?php include "db.php"; error_reporting(0); $id=$_GET{"nid"}; $update=mysql_query("SELECT * FROM news WHERE nid='$id'") or die(mysql_error()); while($row=mysql_fetch_array($update)){ echo "<html dir=\"rtl\">"; echo "<form action=\"updaterep.php\" method=\"post\">"; echo "<head>"; echo "</head>"; echo "<body>"; echo "נושא<input style=\"width: 300px\" type=\"text\" name=\"upd_sub\" value=".$row{"subject"}.">"; echo "<br>"; echo "כתב<input type=\"text\" name=\"upd_rep\" value=".$row{"reporter"}.">"; echo "<br>"; echo "תוכן<textarea cols=\"45\" rows=\"25\" name=\"upd_con\">".$row{"content"}.""; echo "<input type=\"submit\" value=\"עידכון\"/>"; echo "</body></html>"; } $subject=$_POST{'upd_sub'}; $reporter=$_POST{'upd_rep'}; $content=$_POST{'upd_con'}; mysql_query("UPDATE news SET subject='$subject',reporter='$reporter',content='$reporter'"); ?>
|