timmah1 Posted December 22, 2008 Share Posted December 22, 2008 Does anybody have any idea why this makes everyone log in twice? I have a login form at the top of my pages, on the header, and it directs to login.php, which is this, to verify. But it always makes you login twice if($_POST['login']) { session_start(); require("config.php"); $loginsql = "SELECT * FROM memSales WHERE email = '" . $_POST['email'] . "' AND password = '" . $_POST['password'] . "'"; $loginres = mysql_query($loginsql); $numrows = mysql_num_rows($loginres); if($numrows == 1){ $loginrow = mysql_fetch_assoc($loginres); $_SESSION['SESS_LOGGEDIN'] = 1; $_SESSION['SESS_NAME'] = $loginrow['name']; $_SESSION['SESS_EMAIL'] = $loginrow['email']; $_SESSION['SESS_PASS'] = $loginrow['password']; header("Location: " . $config_basedir . "members/"); } else { header("Location: " . $config_basedir . "login.php?error=2"); } } Thanks in advance Link to comment https://forums.phpfreaks.com/topic/138041-solved-login-twice/ Share on other sites More sharing options...
timmah1 Posted December 22, 2008 Author Share Posted December 22, 2008 figured out, thanks Link to comment https://forums.phpfreaks.com/topic/138041-solved-login-twice/#findComment-721500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.