I am doing a stock management website and the only issue I have at the minute is page restrictions so normal users cannot access the sensitive administrative data.

I have made this test code:

```
    <?php 

    $perm = $_SESSION["perm_level"];

    if ($perm == 0) {
        $test = "Employee";
    } elseif ($perm == 1) {
        $test = "Manager";
    } elseif ($perm == 2) {
        $test = "Teacher";
    } else {
        $test = "No value retrieved from session.";
    }

    ?>

```

The results are printed out into the admin.php page and as such I only get Employee and no $perm even though both $perm and $test are echoed out. How do I assign the session variable correctly to the variable $perm?