Re: Script not updating
| From: | Simon Garner | Date: | Sun, 25 Feb 2001 23:36:20 +0000 |
| Subject: | Re: Script not updating | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41616@lists.php.net to get a copy of this message | ||
From: "Peter Houchin" <peterh@vfsa.com.au>
> Could some one please have a look thru my code and tell me why it creates
a new record instead of updating the record?
>
[snip]
>
> if ($submit){
>
> $result = mysql_query("INSERT INTO app
(name,company,address,suburb,state,post,areacode,phone,faxareacode,fax,email
,secret) VALUES
('$name','$company','$address','$suburb','$state','$post','$areacode','$phon
e','$faxareacode','$fax','$email','$secret')");
>
^^ Here's your culprit. Check your logic. Whenever they push submit it
INSERTs a new record (I think...).
Regards
Simon Garner