Code: Select all
$lastlogin = date('Y-m-d H:i:s');
$sql = "UPDATE Users SET lastlogin='$lastlogin' WHERE UserID=$row[0]";
mysql_query($sql) or die("Can't insert last login info");
//echo "<span class=alert>You have been logged on! You may proceed!</span>";
$_SESSION['UN'] = (string)$row[1];
$_SESSION['UI'] = (int)$row[0];
$_SESSION['isAdmin'] = (int)$row[11];
header("Location: http://snuffreviews.com/index.php");
He/She logs on with correct Name and Password
The above code gets executed and they are Redirect to index.php
The problem is they are not logged in and the User menu does not show up so
He/She logs in again with the same info
The second time around they are always allowed in ?
Any idea why it takes two times for the above code to work for some people? For others like myself it works on the first try. Feel free to test out the real thing at SnuffReviews.com, just let me know to get rid of your account after.