session_start(); include ("../inc/config.php"); include ("../inc/global.php"); $_SESSION["userPassed"] = 0; if (isset($_REQUEST["btnLogin"])) { //load password from databse from database $result = mysql_query("select * from options"); $row = mysql_fetch_array($result); $user = "admin"; $pass = $row["pass"]; $nUser = $_REQUEST["txtUser"]; $nPass = $_REQUEST["txtPass"]; if (($nUser==$user) && ($nPass==$pass)) { $_SESSION["userPassed"] = 1; $_SESSION["userName"] = "admin"; header("Location: art.php"); } } ?>
|
|