Only Allow Access to Page if Arrived from Assigned

One way to allow access to a page only if the user came from an assigned page is by using PHP sessions. You can set a session variable on the assigned page and then check for that variable on the page you want to restrict access to. If the session variable is not set, you can redirect the user to another page1.

For example, on the assigned page you can set a session variable like this:

session_start();
$_SESSION['fromAssignedPage'] = true;

Then on the page you want to restrict access to, you can check for that session variable like this:

session_start();
if (!isset($_SESSION['fromAssignedPage'])) {
    header("Location: anotherPage.php");
}

This will redirect users who did not come from the assigned page to anotherPage.php.