hey there guys i have the following code...
$do = crypt($pass,$login);
if(($login != null) && ($pass != null)) {
$auth1 = mysql_query("SELECT member_pass FROM members WHERE member_login = '$login'");
$auth2 = mysql_fetch_array($auth1);
$pass1 = $auth2["member_pass"];
if($pass1 == $do) {
$val = $login . '&&' . $pass;
$epxr = time()+3600;
$that = setcookie("biffy", $val, $expr, "/");
} else {
echo("Sorry the username and password didn't match, please try again $do & $pass1");
login_form();
}
} else {
echo("You MUST enter both user name and password!!<BR>");
login_form();
}
as you can see its a fairly simple member login/authenticate script. anyway, when i run the script it fails the if($pass1 == $do) statement and goes onto the else one... however it then proceeds to echo $do and $pass1 which are exactly the same....
can anyone shed a bit of light on this?!?!