weaksauce
07-17-2008, 03:27 PM
I have a table called Users, which contains the fields:
{user_name,password,name,user_level,fname,lname}
I have a registration/login process to the site, and my question is how can I make an if statement to test for a duplicate entry during the registration. I only want to test for a duplicate user_name, i dont really care about the first name and last name... and name is for the user type (admin,student, etc.) and user level is an enum. If I try to submit it doesn't allow me to register and it gives me a sql error but I just want to clean it up and maybe on the registration page put a button that can check user_name availability.
Thanks in advance...
{user_name,password,name,user_level,fname,lname}
I have a registration/login process to the site, and my question is how can I make an if statement to test for a duplicate entry during the registration. I only want to test for a duplicate user_name, i dont really care about the first name and last name... and name is for the user type (admin,student, etc.) and user level is an enum. If I try to submit it doesn't allow me to register and it gives me a sql error but I just want to clean it up and maybe on the registration page put a button that can check user_name availability.
Thanks in advance...