views:

13

answers:

0

I have made a site in PHP and I'm using cookies for logging in/out. It works great on all types of browsers in Windows XP but the case is vice versa when it comes to Windows Seven. It doesn't log in when I use this part of code:

setcookie("var_name","var_value");

And I have to define an expiry time like this:

setcookie("var_name","var_value", time() + 3600);

When I add this cookie (i.e. the user logs in the site), the time I'm trying to delete this cookie item (i.e. the user logs out) it doesn't work, this is the code:

setcookie("var_name", "", time() - 3600);

What should I do to solve this? Thanks in advance.