Hello there -
I need to have two login sections within one site. I'm using sessions to do this, but what I'm noticing is that if you login in to one area you can access the other area... I'm sure I'm not implementing this correctly:
session_start(); // Start the session.
// If no session value is present, redirect the user:
// Also validate the HTTP_USER_AGENT!
if (($_SESSION['agent'] != md5($_SERVER['HTTP_USER_AGENT'])) OR (!isset($_SESSION['agent']))) {
require_once ('includes/login_functions.inc.php');
$url = absolute_url();
header("Location: $url");
exit();
}
How do I modify this code for the 2nd site so that when a session is set for the 1st site it won't have access to the 2nd?
Thanks.D