Ok, I read this post and someone suggest using this code to check if user left page:
if($_SERVER['REQUEST_URI'] !== 'page_with_session.php'){
session_destroy(); // Kill session for all pages but page_with_session.php
}
Now can someone please explain how REQUEST_URI works cause I can't seem to find it in the PHP manual, or can someone suggest another way to check when a user has left a page.
Please note I can't use Javascript for this project.