Thanks Ray, Finally I managed the code as I wanted a little bit different from your guidance. I did not change the "MySQLi Log In User" at all. Instead I changed the successful redirected page with IF statements as follows:
<?php
//Direct pages with different user levels
if ($_SESSION['accesslvl'] == '1') {
header('location: user1.html'); //User1
session_register("username");
session_register("password");
}
else
if ($_SESSION['accesslvl'] == '2') {
header('location: user2.html'); //User2
session_register("username");
session_register("password");
}
else
if ($_SESSION['accesslvl'] == '3') {
header('location: user3.html'); //user 3
session_register("username");
session_register("password");
}
else
{
// Error login
echo "<script>alert('Access Denied!');
window.location='access_denied.php';
</script>";
}
?>