60 ) { // Yes the time has passed so need to query the database // update time stamp $_SESSION[logtimestamp] = time(); // no need to check for another time interval $path = 'C:\xampp\htdocs\xml'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); $path = '/home/cjones/public_html/xml'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); include ('connsub_i.php'); // now use the more traditional method to get results $query = 'SELECT `xmlusername` FROM `users` WHERE `username` = "' . $_SESSION[subusername] . '" LIMIT 1'; // Set up a response array $result = $mydb->query($query); $row = mysqli_fetch_assoc($result); // Disconnect $mydb->close(); // Check if current token matches the stored one if ($_SESSION[logkey] != $row[xmlusername]){ // was logged in $hd = 'Location: /xml/submainlogin.php' . "?fn=" . 'loggedin'; header($hd); exit(); } } } } else { $donotshow = 1; } ?> GCSE ICT Quizzes

teach-ict.com logo

THE education site for computer science and ICT