I need to update a cookie. I do that in a php file called via ajax. This is is the code:
setcookie(\'items[\'.$_POST[\'id\'].\']\');
The cookie
This is syntax for setting a cookie
setcookie(name, value, expire, path, domain);
When you create a cookie, using the function setcookie, you must specify three arguments. These arguments are setcookie(name, value, expiration):
Note:- This will rewrite your cookie not update.