but that's why i've got the
if($name){ ....
if($submit) ...


clause in it .. thinking that if there was a name then update the record..
otherwise create a new one
-----Original Message-----
From: Simon Garner [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 10:36 AM
To: Peter Houchin; PHP MAIL GROUP
Subject: Re: [PHP] Script not updating


From: "Peter Houchin" <[EMAIL PROTECTED]>


> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to