hi how to update my cookies value in php without change expiration date?
is this possible ? pls suggest your answers
hi how to update my cookies value in php without change expiration date?
is this possible ? pls suggest your answers
No. You don’t know the expiration date of cookies sent to you, so while you can set another cookie with the same name, you will be changing the expiration.
To create or to update a cookie use PHP function setcookie(). for further reference about this function please visit:
PHP: setcookie - Manual
if we use setcookie, the expiration date also changed i need only to update the value of one cookie without changing the expiration time
Again, not possible.
Only the cookie name and value, not its expiration time, is sent with each request.
You cannot change the value without changing the expiration time unless you know exactly when you previously set that cookie.
how to get the expiration date from the cookie
Again, not possible.
Only the cookie name and value, not its expiration time, is sent with each request.
You cannot change the value without changing the expiration time unless you know exactly when you previously set that cookie.