Quote:
Originally Posted by ZeniMax
I dont want to see the password (becaouse its impossible). I only want to see the row info. But my question its why all the time gives blank results.
PS: I use this to compare function (its a page for change password, I add to compare the $_POST['answer1] to compare with the answer1 in user_auth.
Code:
$answer1_e = '0x' . bin2hex($respuesta1);
|
In that case, ask for old pass, encrypt it, then u check if that password is the same that the password stored using the binary function for SQL..
its like..
PHP Code:
$query = "SELECT account, password FROM user_auth with (nolock) WHERE account = '".$_POST['account']."' AND password = CONVERT(binary, ".encrypt($_POST['oldpass']).")";
$link = mssql_query ($query);
if(!mssql_num_rows($link)){
$error = "wrong password";
}