ccrevcypsys Posted January 2, 2008 Share Posted January 2, 2008 What is the best and fastest and easiest way to do an admin login for a local site (so it doesnt need much)? this is the way that im doing it... (its sucks but it fools my boss into thinking it works lol ) if($_GET['p']){ $query = "SELECT s.sessId, c.customer_id, c.firstName FROM `sessions` s LEFT JOIN `customer` c ON c.customer_id = s.customer_id WHERE ip_address="; $result = mysql_query($query) or die(mysql_error()."<br /> Error 1"); $row = mysql_fetch_array($result, MYSQL_NUM)or die(mysql_error()); if($row==FALSE){ header("Location: index.php"); }else{ $insert = ""; } } and there is a preset admin name and password. so when there is no session found in the db then it goes to the login screen but this doesnt work if there is more than one session login. And there is nothing stopp[ing me from jsut getting to one of the pages if my boss forgot to log out. So how can i do this easy and fast? Quote Link to comment https://forums.phpfreaks.com/topic/84155-session-questions/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.