How to write a php code to notify a user for logout when they click on the window without logout Close the webpage ...
First check that the session is continuous, for example Check that the value is set, then output the javascript code.
& lt;? If (isset ($ _ session ['user'])) {echo '& lt; Script type = "text / javascript" & gt; Window.onbeforeunload = function () {Return "Did you save your luggage?" } '; }? & Gt;
No comments:
Post a Comment