Page 1 of 1

Login and out using PHP

Posted: Tue Sep 22, 2009 3:28 am
by samsambm
Hi ,
I'm desigining a simple site using php. I've set up users account and registertion form. Also I've added a login and logout feature.

After user login to the site he is redirected to page with the option to sign out ( i've used session_unset() and session_destroy() functions.

Mu issue is that after the user is signing out he is redirected again to home page but when I clicking 'Back' on the browser , The user get again the 'sign out' option .

Is some one can help me here ?

Thanks .

Re: Login and out using PHP

Posted: Tue Sep 22, 2009 5:17 am
by jackpf
The page is loaded from cache. How is this a problem? They're not actually logged in.

You could send a "no-cache" header...but that'd increase your bandwidth for no real reason tbh. I personally wouldn't bother.

Re: Login and out using PHP

Posted: Tue Sep 22, 2009 6:50 am
by samsambm
There is no issue except the fact that the user see's the 'sign out' button....

Re: Login and out using PHP

Posted: Fri Sep 25, 2009 11:56 am
by kaisellgren
The problem is non-PHP related. You need to tell the browser not to cache anything, but as far as I know, Firefox does not obey those rules very well. Try Cache-Control along with Expires header.

Re: Login and out using PHP

Posted: Fri Oct 09, 2009 2:09 am
by jegan.aaodis
Hi,

Please check the logout redirection script.
And check whether the section is closed or expired.

Thanks