i crypted teh password as you joined ...
Code: Select all
$crypt_pass = crypt($pass);Code: Select all
$qry = mysql_query("SELECT * FROM users WHERE login = '$login'");
if (mysql_num_rows($qry) == 1){
$row = mysql_fetch_assoc($qry);
$crypt_pass = $rowї'pass'];
$salt = substr($crypt_pass,0,2);
if ($crypt_pass == crypt($password,$salt)){
session_start();
$log = $rowї'status'];
$id = $rowї'id'];
$crypt_log = crypt($log);
$crypt_id = crypt($id);
session_register('crypt_log');
session_register('crypt_id');
mysql_query("UPDATE users SET online = 'y' WHERE id = '$id'");
}
} else {
echo("Nope wrong login or pass");
}Code: Select all
$a1 = "user";
$a2 = "staff";
$a3 = "admin";
$salt = substr ($crypt_log,0,2);
$u = crypt($a1,$salt);
$s = crypt($a2,$salt);
$a = crypt($a3,$salt);
if ($crypt_log == $u && $go != 'lout'){
include ("ucp.php");
}
else if ($crypt_log == $s && $go != 'lout'){
include ("scp.php");
}
else if ($crypt_log == $a && $go != 'lout'){
include ("acp.php");
}
else if (!$crypt_log || $go == 'lout'){
include ("log.php");
}this is a sample of the crypt that comes out when you register
$1$Cs8AgYVE$pLQI
also I'm not getting any errors ....