Try with this script:
$findDupli = mysql_db_query("DataBaseName", "SELECT user from user_profile where user='$user'");
$Rows = mysql_num_rows($findDupli);
if ($Rows >= 1)
{
print "User $user Already Exists";
exit();
}
Before Inserting user Data execute this query..
--Shastry
cyk0 wrote:
Hello,
I am making a simple PHP Login/Register System, and I would like to know how to check the MySQL Database
to see if the user already exists when a user trys to sign up.
Can you help?
Thanks,
cyk0