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.
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