If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > IF statment

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-04, 15:36
Cobra123 Cobra123 is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 07-03-04, 19:51
yellowmarker yellowmarker is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On