problems logging out with cookies

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
lacroix13
New php-forum User
New php-forum User
Posts: 64
Joined: Thu Aug 22, 2002 1:07 am

problems logging out with cookies

Postby lacroix13 » Thu Aug 29, 2002 4:47 am

i have a page that uses for loging in cookies containing the user id. when i log-out,i delete the cookie.the problem is that after loging in,if the user presses the back button he can enter the site and still use some of the scripts that i can't protect with cookies.if after hiting back it hits refresh,he gets kicked out of the site.

???How can i refresh the page automatically when i hit back???? :?:

elitecodex
New php-forum User
New php-forum User
Posts: 68
Joined: Tue Jul 09, 2002 8:45 am
Location: East Coast, USA
Contact:

Postby elitecodex » Thu Aug 29, 2002 4:52 am

Im not sure about refreshing, but you could use session variables. When you log out, you can set a session variable to false, and just check that on every page you want to keep secure. This would work if I understand your question clearly, but im not sure if I do. Let me know.

Will

Jay

Postby Jay » Thu Aug 29, 2002 2:03 pm

Try inserting these between the head tags:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">

If I understand them correctly they'll try to get a new copy of a page every time it's accessed instead of using the local cached version!


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest