\n" ;
$db = @ mysql_connect ("localhost", "rot", "admin")
or die ("keine Verbindung möglich: " . mysql_error());
$name=strtolower($_POST['login']);
$QUERY="SELECT password FROM accounts WHERE userName = '$name' ";
if($res=mysql_db_query('users', $QUERY)) {
$rows=mysql_num_rows($res);
if ($rows==0) {
echo "this user has no valid account
\n";
}
else {
echo "this user has a valid account
\n";
$pswd=mysql_result($res,0,'password');
if(strtolower ($pswd)==strtolower($_POST['password']))
echo "the password to this user is valid
\n";
else echo "the password to this user is not valid
\n";
}
}
}
?>