prob with the sessions
Posted: Mon Apr 07, 2003 2:14 pm
i have this code
when i active the function is_login the page is not work all the function just hold and don't send the user to any place even if he login and all the data are correct
how i can fix this
Code: Select all
<?php
function is_login() {
if ($_SESSION) {
if ($exp != true && $login == '') {
header("Location: HTTP://" .$_SERVER['HTTP_HOST'] ."/main/admin/index.php?loc=login");
}
}
else { header("Location: HTTP://" .$_SERVER['HTTP_HOST'] ."/main/admin/index.php?loc=login"); }
}
function checkuser($user ,$pass) {
$this->condb();
if ($this->condb()!=true) {
foreach ($this->auth as $data) {
if ($user == $data['user'] && $pass == $data['pass']) {
$login = $user;
$exp = true;
session_register('login');
session_register('exp');
header("Location: HTTP://" .$_SERVER['HTTP_HOST'] ."/main/admin/index.php?loc=main");
}
else {
$this->msg = "PassWord/User are not correct"; }
}
}
}
?>how i can fix this