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



I created a cookie with the value like '1A2A',now i want to update this value regularly ..

Answer / 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

More PHP Interview Questions

Can we run php on tomcat server?

0 Answers  


What is php addslashes?

0 Answers  


how can we check mail function with '127.0.0.1' (before submitting a site?

1 Answers  


What is overloading in php?

0 Answers  


How can i send a HTML file to mail account.

2 Answers  






How do you create an array in php?

0 Answers  


How can we destroy the cookie in php?

0 Answers  


What is mem_cache ? How do you put a database query into that ?

5 Answers   NIIT,


What is php session_start() and session_destroy() function?

0 Answers  


Where are the session values stored?

1 Answers  


Is it possible to remove the html tags from data?

0 Answers  


How to create a session? How to set a value in session? How to remove data from a session?

0 Answers  


Categories