MySQL Forums
Forum List  »  PHP

Help verifying Username
Posted by: Brandon Nelson
Date: November 27, 2014 08:09PM

I have an issue where I query my database and want it to see if the username exist.. if it does, then follow the header and if not, continue and enter the info in the database.....

This code is stopping all from being entered and always follows the header.... Any thoughts??

$result = mysql_query("SELECT * FROM users WHERE User_Name='User_Name'");
if($result >0)
{

header('Location: UserExistError.html');
}
else {
rest of code

}

Options: ReplyQuote


Subject
Written By
Posted
Help verifying Username
November 27, 2014 08:09PM
November 27, 2014 08:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.