I'm helping a client with an older website an am coming across code which was written several years ago (not sure if this is relevant, but I mention it just in case) and keep getting an Undefined index error, despite using the various suggestions (namely isset) mentioned on the site. Mostly I'm moving files over from the older server, where the site worked fine, so I'm not sure why I'm getting this error. I'd assume is has something to do with the variable 'sessionID' not being set, but I cannot find anywhere in the existing code where it is set -
<?php
session_start();
error_reporting(E_ALL);
if ($_SESSION['sessionID'] != session_id() || !$_SESSION['userID']) {
// login page
} else {
// admin page
}
?>