How do I...

Sharky Forums


Results 1 to 3 of 3

Thread: How do I...

  1. #1
    Reef Shark
    Join Date
    Oct 2002
    Posts
    291

    How do I...

    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 :'(
    Last edited by CRowsey; 12-09-2002 at 04:19 PM.

  2. #2
    Ursus Arctos Moderatis Grizzly's Avatar
    Join Date
    Sep 2000
    Location
    Providence, RI USA
    Posts
    3,077
    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:
    PHP Code:
    select from users where username='$username' 

  3. #3
    Reef Shark
    Join Date
    Oct 2002
    Posts
    291
    /me slaps head, duh

    thanks
    Last edited by CRowsey; 12-09-2002 at 05:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •