I created a cookie with the value like '1A2A',now i want to
update this value regularly (about 20 times in a minute)
with the value '1A2A3A' , 3A is the new value,new value
will vary on the request it may be 3A or 4A or 100A ,some
times the cookie is updating with new value but not every
time.Can any body suggest the solution
Answer Posted / amit verma
use PHH function "setcookie", the only point to note is,
the name of the cookie needs to be same, for differetn
values of this cookie. This way it will keep overwritting
different values for single cookie. Syntax is -
setcookie("TestCookie", $value1);
setcookie("TestCookie", $value2);
setcookie("TestCookie", $value3);
..
.. and so on
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to create a public static method in PHP?
How can we access the data sent through the url with the post method?
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
How do you check is php not empty?
Explain me what is the w3c?
How to get best php developer Experience in Php with Sugar CRM / VTiger.
How do you trim spaces in excel?
What are properties in php?
Tell me what are magic methods?
How to update memcached when you make changes to php?
What is a simple php method to make a cross domain data request?
How to set cookies in PHP?
How to set session.gc_maxlifetime properly?
Explain the casts allowed in PHP?
What is the best php framework 2018?