Results 1 to 2 of 2

Thread: IF statment

  1. #1
    Join Date
    Jun 2004
    Posts
    1

    Unanswered: IF statment

    im new to PHP/MySQL so i was hoping you could help me.

    i have made a login section but need a script or a way to prevent more than one person to have the same username and email, and give them an error message if they try and use a username/email that some1 else has when they register.

    thanx for ur help, Cobra

  2. #2
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    1. let the user submit the form with the username they want
    2. in php detect that the form has been submitted
    3. query the database to see if the username already exists. if it already exists present the form to the user again with an informative message, else insert the new username

Posting Permissions

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