hi,
what you can do is just create a separate folder for members and admin..and separate table for both login, keep it clean for long run
member will use the session as
session_start();
// If the session vars aren't set, try to set them with a cookie
if (!isset($_SESSION['user_id']))
{
if (isset($_COOKIE['user_id']) && isset($_COOKIE['username'])) {
$_SESSION['user_id'] = $_COOKIE['user_id'];
$_SESSION['username'] = $_COOKIE['username'];
}
}
and admin as
session_start();
// If the session vars aren't set, try to set them with a cookie
if (!isset($_SESSION['admin_id']))
{
if (isset($_COOKIE['admin_id']) && isset($_COOKIE['adminuser'])) {
$_SESSION['admin_id'] = $_COOKIE['admin_id'];
$_SESSION['adminuser'] = $_COOKIE['adminuser'];
}
}
Note: make sure the difference in cookie