making php constantly check for session

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!

Moderator: General Moderators

Post Reply
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

making php constantly check for session

Post by suthie »

I am using iframes in a website i am making, and i want the page to know what is going on within the iframe by using a session.

how can i make the page constantly check a session to see if you are logged in and then either display "you are not logged in" or "you are logged in as username" ?
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

AJAX might be able to do that. Why do you want to check constantly? Usually someone is only going to be able to do so something if the page is either refreshed or a request for a different page has been made. If those two are the case, you can check if they are logged in at that point. I wouldn't think checking constantly would be good for performance or reliability.
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

Post by suthie »

i just need the session variables to always be up to date. these variables will only change when stuff goes on inside the iframe.

i guess what i am asking for is probably not the best way to make this happen.

what i still need is for the page to refresh if the session ends. how can i do that?
Post Reply