PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If the cookie expires, it will just go back to the log in page. I need to show some sort of indication that the cookie expired instead of just showing the log in page. Ex: "Your session has expired. Please log back in." Is there a way of detecting that the cookie expired?
Just check to see if they have the cookie and if the http_referrer came from your website. If there's no cookie and the referrer was your own website then you know they were logged in but the session expired.