-
- Hello
-
hi all
Hello there!
-
php logout script trouble
You are reloading the page, aren't you?
-
php logout script trouble
So after waiting 60 seconds and then reloading a page is the session still valid?
-
php logout script trouble
I'd need more information than that to be able to help. What actually happens? What does your code look like?
-
php logout script trouble
Its probably a good idea to work it into the function that you use to secure your pages, or setup the session for your users. You'd want to call that from every (secured) page to prevent unwanted access to your site.
-
php logout script trouble
If you mean can you detect when someone closes their browser window, then the simple answer is no. The best thing to do is make your user sessions timeout after a pre-determined period of inactivity. For example: if (array_key_exists('accessed', $_SESSION)) { if (time() - $_SESSION['accessed'] > 60 * 30) { $id = $_SESSION['id']; mysql_query("UPDATE myMembers SET logged_in='N' WHERE id='$id'"); // session last accessed more than 30 minutes ago session_destroy(); $_SESSION = array(); print 'Your session has expired due to inactivity.'; exit(); } else { $_SESSION['accessed'] = time(); } } Although this will obviously only get run when someone makes a request for some resource on your server.
-
Hey guys!
Hello!
-
-
Was this a fair price?
And probably best not to take this approach either
-
Was this a fair price?
FWIW, that sounds like a reasonable quote to me. Good luck!
-
Icon search engine
I wish I'd know about this sooner. Thanks for posting.
-
-
Looking for some icons
http://icons.mysitemyway.com/
-
Hello, world!
Welcome and good luck with your freelance venture.
-
-
How important is i 6 compatibility nowadays.
Thanks, I'll give that a go!
- :)