Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hello,

I have been working on script 12.5. which allows to set cookie's parameters.

As the example in the book shows, I wanted to set cookie that expires within 1h from creation.
 

setcookie('user_id', $data['user_id'], time() + 3600, '/', '', 0, 0);

When checking the cookie after successful signing-in, Expires: always says Session.

Why is that?

 

Thank

Link to comment
Share on other sites

I am 100% sure I am looking at the correct cookie.
No matter how I set expiration parameter it always says "Session".
If I set expiration to time()+60 it actually expires after 60 seconds and I am not able to see restricted content.
So it works but I do not see this value when I view cookie.

Link to comment
Share on other sites

 Share

×
×
  • Create New...