OK, here is what I have setup.
What I don't know how to do.
Refresh the session time so that it won't timeout for x time. Each time the user states they want to keep the session open.
session_check_timeout();
});
function session_timeout() {
if (confirm('Your session will end in 10 minutes do you want to refresh your session?')) {
$.ajax({
url: '<?php echo ROOT_URL; ?>php/content/careers/refresh_session.php',
success: function (data) {
session_check_timeout();
}
});
}
}
function session_check_timeout(){
setTimeout(session_timeout, 5000);
}