Click to See Complete Forum and Search --> : How do I...


CRowsey
12-09-2002, 03:18 PM
using php and mysql, and a user registers how do I check the database to see if the username is taken and or the email has been used to register?

I've been looking around the web for the past couple of days and I couldn't find anything that helps much :'(

Grizzly
12-09-2002, 04:27 PM
If you want to see if the user name is taken, simply run a select query based on that user name. If any records are returned, than you know that user name is taken.

ex:

select * from users where username='$username'

CRowsey
12-09-2002, 04:56 PM
/me slaps head, duh

thanks ;)