[snip]
is there a simple way to automatically load a new page according to a
choice made by a user.
If one persons logs in they go to one page, If another peson logs in they go
to another page?
[/snip]
Use a switch statement as below;
//start session
session_start();
session_register("emailid");
session_register("level");
$dbuser = mysql_fetch_object($dbresult);
$emailid = $dbuser->email;
$level = $dbuser->accesslevel;
//send the user to a page based on their user level
switch($level)
{
case "author":
header("Location: myart.php"); exit;
break;
case "editor":
header("Location: editor.php"); exit;
break;
case "approve":
header("Location: approve.php"); exit;
break;
case "schedule":
header("Location: sched.php"); exit;
break;
case "admin":
header("Location: admin.php"); exit;
break;
default:
header("Location: loginfail.php"); exit;
}
Each type of user is sent to a particular page based on their $level.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php