Checking if the user is in the database

Tell me what’s wrong?


Answer 1, authority 100%

Obviously bad manners) Try this:

$name= mysql_escape_string($_POST ["name"]);
$res = mysql_query("SELECT id FROM users where name='$name'");
$c_e = mysql_num_rows($res); 
if ($c_e>0) {
$errm .= " "; 
$error=1;
}

P.S. “What infection?” – hahahahaha