MSQLI, whats wrong ?

[php]
$myu = SAFE($_POST[‘myusername’]); //give back clean: [email protected]
$myp = SAFE($_POST[‘mypassword’], TRUE); //give back, md5 equal to db the password
echo 'mail: ’ . $myu . ’ password: ’ . $myp . ‘
’;
if($statement = $db->prepare(“SELECT ID FROM USER WHERE EMAIL = ? AND PASSWORD = ?”)) { echo ‘prepare oke
’; }
if($statement->bind_param(‘ss’, $myu, $myp)) { echo 'BIND OKE
'; }
if($statement->execute()) { echo ‘EXECUTE IS OKE
’; }
echo 'ROWs: ’ . $statement->num_rows . ‘
’;
if($statement->num_rows == 1) {

		echo 'succes <br>';
	
	} else {
		notibox('WRONGINFO');
		$ub = $myu;
		include_once('PAGE/login.php');
	
	}
	[/php]

Output:

mail: [email protected] password: (md5password) prepare oke BIND OKE EXECUTE IS OKEw ROWs: 0

I checked the output twice the mail is correct and password is correct! what the hell, i hate mysqli

Sponsor our Newsletter | Privacy Policy | Terms of Service