I'm using a MySQL database to handle my member signups/logins... so was wondering, how do I make sure there aren't any duplicate signups?
at the initial signup screen, I'm asking for first name, last name(I plan on using these as the username) password and email. Also, I have another column(ID) as my primary key.
So, suppose I add address fields in here, how do I check to make sure a member doesn't register twice?
You can make the last name and first name fields a non-duplicable index and you can make the email address a non-duplicable index. Then when you go to add a record to the database you can look for whatever error code mySQL throws out for duplicate index's and tell them that their choice is already taken.
Internet Media Provider
well, you can do a
SELECT * FROM table WHERE first_name='$first_name' && last_name='$last_name'
if it returns any rows, you return an error message that the acct already exists.. if not, you then go ahead and create account http://www.webmaster-resources.com/forums/smile.gif
ReviewDepot - search for hosts - get hosts to BID for YOUR business
Vinay Sahni (email@example.com), Coder .. specializing in php/mysql
( Realmz ) ( ReviewDepot ) ( . . : : k r y o g e n : : . . )
aah, yes, forgot about that.... guess I was being lazy http://www.webmaster-resources.com/forums/wink.gif