Problem with my PHP code and I cant find it.

skreet

Senior member
Sep 7, 2004
681
0
0
if ($_COOKIE['user']!="") {

$conn = mysql_connect($mysql_host, $mysql_uname, $mysql_pass);
mysql_select_db($mysql_db);

$result = mysql_query("select password from users where id = '{$_COOKIE['user']}'");

$total = mysql_num_rows($result);
$data = mysql_fetch_row($result);
$realpw = $data[0];

if ($COOKIE['pass'] == $realpw) {
if($debug==1) echo "Password Match";
} else {
if($debug==1) echo "Password Does Not Match ({$realpw}, {$_COOKIE['pass']}) ({$total})";
header("Location: login.php?from=main.php&ha=yes"); //ha = hack attempt?
}
} else {
if($debug==1) echo "No Cookie";
header("Location: login.php?from=main.php");
}


}

Password Does Not Match (d41d8cd98f00b204e9800998ecf8427e, d41d8cd98f00b204e9800998ecf8427e) (1)

...Help?