I'm trying to use a web form to either update a database record if it exists (using the email address as the verification), or insert a new record if it does not... and I'm clueless!
Right now I have the insert script working, I just don't know how to include the Update.
Here's the working code I have for the insert and page redirect when complete:
PHP Code:
$query="insert into tblMyTableName (firstname,lastname,company,title,email,phone,v1datesubmitted,v1,v2,campaign) values ('".$firstname."','".$lastname."','".$company."','".$title."','".$email."','".$phone."','".$v1datesubmitted."','".$v1."','".$v2."','".$campaign."')";
mysql_query($query);
header("Refresh: 0;url=../?page_id=25");
I appreciate ANY help on this!! Thanks!!