Quote:
PHP Code:
// Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['myusername']=$myusername;
// $_SESSION['LoggedIn'] = 1; header("location:main.php");
|
That should be something like
PHP Code:
$_SESSION['myusername']=$myusername;
$row=mysql_fetch_assoc($result);
if($row['usergroup']==1)
header("location:main.php");
else
header("location:admin_main.php");
PS: You'd need to add proper checks on top of all protected pages to ensure the
usergroup status of the user when accessing them.