I insert the users output like this:
$userName= SanitizeString($userName);
$pass= SanitizeString($pass);
$email= SanitizeString($email);
$userName=mysql
You have to use GROUP BY
if you want to use COUNT(*)
, but you can get the number of rows with mysql_num_rows()
like this.
$result=mysql_query("SELECT * AS Result FROM users WHERE user_name='$user_name' AND pass='$password_hash' LIMIT 1") or die(mysql_error());
$num_rows = mysql_num_rows($result);