php会话计时器在同一页面上刷新(就业表格)

OK, here is what I have setup.

  • Basic jquery timeout check set 10 minutes before.
  • PHP page that is called upon being confirmed that they want to keep the session open.

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);
    }