ob_start(); session_start(); session_name("login"); $login = $_SESSION["login"]; if ($login_session==true) { header("Location: ".$shopurl."/home.php"); } include "_include.php"; $lid=$HTTP_GET_VARS["lid"]; if ($lid=="validate") { $username=str_replace("'","-",$_POST["username"]); $password=str_replace("'","-",$_POST["password"]); $sql="select * from tbl_admin where usr = '".$username."' and pass = '".$password."'"; $rs = $db->execute($sql); if ($rs->EOF) { $message="User not found."; } else { $_SESSION["login"]=1; header("Location: "."home.php"); } } ?>