Checking duplicate users
Posted: Wed Jul 31, 2002 8:22 am
Can someone steer me in the right direction?, On my form, once the user has entered his information and pressed the "Save" button i want my code to check if that name already exists, and if it does spit out a message and if it doesn't then add the new user.
This is where i would like to insert that piece of code:
[syntax=php]if ($_POST['button'] == 'Save') {
$query = "INSERT INTO clientinfo (client_id, contact_name, position, department, street, city, prov_state, country, zip_postal, phNumber, faxNumber, pagerNumber, email) VALUES '$client_id', '$contact_name', '$position', '$department', '$street', '$city', '$prov_state', '$country', '$zip_postal', '$phNumber', '$faxNumber', '$pagerNumber', '$email');";
}[/syntax]
Thnx
This is where i would like to insert that piece of code:
[syntax=php]if ($_POST['button'] == 'Save') {
$query = "INSERT INTO clientinfo (client_id, contact_name, position, department, street, city, prov_state, country, zip_postal, phNumber, faxNumber, pagerNumber, email) VALUES '$client_id', '$contact_name', '$position', '$department', '$street', '$city', '$prov_state', '$country', '$zip_postal', '$phNumber', '$faxNumber', '$pagerNumber', '$email');";
}[/syntax]
Thnx