Jump to content

session questions


ccrevcypsys

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/84155-session-questions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.