Jump to content

Cookie creation/deletion


Drezard

Recommended Posts

Im writing an app that uses cookies. Now... my code to create a cookie looks like this:

 

// my cookie creation
setcookie("USER_SESSION", ($this->user_id . "+|+" . $this->password), (time() + 900));

 

my code to delete the cookie looks like this:

// my cookie deletion
setcookie("USER_SESSION", "", ((1-time())-900));

 

The cookie creates but it wont delete.

 

Whats wrong?

 

Daniel

Link to comment
https://forums.phpfreaks.com/topic/132659-cookie-creationdeletion/
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.