PDA

View Full Version : How to write to cookies


jigaruu
12th October 2004, 08:00 AM
Hi All,

I have one more question, i have added a addon module to this progran according to my requirement, but cookies are creating problems, can any one help me where can i write those values which are stored to cookies and can give me all those values with the existing ones,

basically i need to add some values to the cookies list which i have created, so please help me and tell me how to add some more values to the cookies list,

jigaruu....

mark
13th October 2004, 08:54 AM
Hello,

it all depends on which programming language do you use.
If PHP, then there is function setcookie() for writing the cookies, and there is global variable $_COOKIE which contains list of all cookies - you can get the value of cookie from there.

So for example, you can write cookie with:

setcookie("TestCookie", 'some value', time()+3600);


and you can read it later by

$cookieValue = $_COOKIE['TestCookie'];


I'm not sure if this was what you asked.

regards,

mark