Need help with login area/sessions
I have created a set of scripts that will log someone in and direct them to the proper area of the site.
I.e. sysadmin -> admin area and a regular user -> front end protected area
This is all well and good. I had a client request to view the front end as the admin and thus copied the front end scripts to the admin area of course changing the permissions on the new pages to only allow for their login...
Now here is where my problem is...
When viewing the front end as a regular user everything showes up fine in regards to images and so on, but when viewing the exact same scripts copied into the admin area the scripts do not pick up on the recently added content therefore the front end shows new content where the back end is showing nothing was added.
So What I am wondering is how do I go about giving the admin access to the front end without breaking the session in the back end? I want the admin to be able to log into the back end and click a link to the protected front end.
I currently have code like this protecting each page
session_start();
if($_SESSION['is_logged_in']!='1'){
header("Location: recipes.php");
}
session_start();
if($_SESSION['is_logged_in']!='1' || $_SESSION['is_logged_in']!='2'){
header("Location: recipes.php");
}
Bored. Learn everything you need to know about Organic Gardening.