Re: insert to DB
| From: | David Hall | Date: | Sun, 18 Dec 2005 16:13:37 +0000 |
| Subject: | Re: insert to DB | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-227610@lists.php.net to get a copy of this message | ||
<? if ($_POST["$submit"]) {You don't set id in this case. Of course, from some of your other code, it looks like you're relying on register_globals to be on, so maybe it is and that's not why. David Hall$Name = $_POST["Name"];$Rating = $_POST["Rating"]; $sql = "UPDATE leaderboard SET Name='$Name', Rating='$Rating' WHERE ID=$id";//replace news with your table name above $result = mysql_query($sql); echo "Thank you! Information updated.";} } ?>