¡@

Home 

2014/10/16 ¤W¤È 12:01:52

jquery Programming Glossary: ajaxsession

PHP / Ajax : How to show/hide DIV on $_SESSION variable value?

http://stackoverflow.com/questions/19110684/php-ajax-how-to-show-hide-div-on-session-variable-value

but you can work on from it actionURL is a php file where you can check if the user is logged in with a valid session. ajaxSession function returns true or false if the user is logged. Then you can call this function every X seconds minutes to control.. every X seconds minutes to control if the session still going. window.setInterval function call your function here if ajaxSession actionUrl return true user logged append show protected divs. else return false remove hide protected divs and ask user.. append show protected divs. else return false remove hide protected divs and ask user to log. 5000 every 5 seconds. ajaxSession function function ajaxSession actionUrl var sessionOK false .ajax async false url actionUrl success function msg check..