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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.