Jump to content

Deleting cookies..?


jackpf

Recommended Posts

Hi all,

Having a bit of a problem allowing users to log off on my site. It works fine in all browsers, except IE8 and safari.

 

Basically, all I'm doing is expiring the cookie with the following code:

setcookie('jackpf_user', '', -100000, '/', '.jackpf.co.uk');
setcookie('jackpf_admin', '', -100000, '/', '.jackpf.co.uk');
setcookie('jackpf_security', '', -10000, '/', '.jackpf.co.uk');

 

This works for most browsers, and the cookies are deleted, but for IE8 and Safari, the cookie still exists, but has the value "deleted", so people are logged on as "deleted"...

 

I was just wondering if there was a better way of making sure cookies are deleted? I haven't found anything on google...

 

Anyway, thanks for any help,

Jack.

Link to comment
https://forums.phpfreaks.com/topic/150476-deleting-cookies/
Share on other sites

Well no, they're not actually logged in as "deleted", only their cookie says they are. I have security which checks everything against the database, so someone with this cookie would not actually be able to view anything restricted.

 

I'm simply concerned about people not being able to log out properly. I just don't understand why it's not deleting the cookies on some browsers...

Link to comment
https://forums.phpfreaks.com/topic/150476-deleting-cookies/#findComment-790348
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.