header not working properly is there any other way?
Posted: Mon Mar 10, 2008 2:23 pm
i am new here
plz help me
plz help me
Code: Select all
$GLOBALS["smarty"]->display('login.tpl');
if($GLOBALS["Get"]->val("submit")!=""){
$admin = $GLOBALS["Get"]->val("admin");
$password = $GLOBALS["Get"]->val("password");
$p=md5($password);
$db = new sqldb;
$sql_query="SELECT * FROM admin WHERE user='$admin' AND PASSWORD ='$p' LIMIT 1";
$value=$db->result($sql_query);
$sn =new session;
if($value['user']&&$value['password']){
$sn->setSess('adminuser','yes');
//echo $value['user'];
header("Location: index.php?page=adminpage");
}
}