I am having problems with this query. the query comes during an user activation process.
I already have the email address a temp password and a dealer code (something specific to this site.)
when they come to activate thier account they type in the above values that the rec'd via email.
then they are asked to input personal information. when I process the personal information i get the following error.
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to
use near 'WHERE email='chris@severndigital.com' AND dealercode='A345''
at line 1
this is the query I am using.
<?
$sql = mysql_query("REPLACE INTO users (password,fname,lname,company,address1,address2,city,state,zip,phone,
fax,activate) VALUES ('$password','$fname','$lname','$company','$address','$address2','$city',
'$state','$zip','$phone','$fax','1') WHERE email='$email' AND
dealercode='$dealerid'") or die(mysql_error());
?>
I've tried a REPLACE INTO and also and UPDATE syntax, and i still get the same error.
any ideas why it's not working??
thanks in advance.
chris