Hi,
I was wondering if I could get any help with these few questions.
How do I set a cookie to never expire?
How do I delete a cookie that has no expiry?
Could I set multiple cookies with the same name but different values, and list each value by doing something like this:
do { echo "$value"; } while ($value);
Any help would be appreciated.
Thanks.
The never expires cookie question. Hmm well you could just add 10 years to the current date and set the expiry to that date. removing the cookie is simular. as for listing them they will just overwrite each other due to having the same name
Mark.
Hmm...
Thanks for the help Mark.
Is there a way I could make each cookie have a slightly different name (cookie1, cookie2, etc.), and call all the cookies with part of their name 'cookie'?
Sorry if that sounds confusing.
Unfortunatly not if you call it cookie1 then you got to call it with cookie1. Of course you could use variable variable names to call them in a loop.
<?
for ( $loop=0; $loop<10; $loop++ ) { $name="cookie".$loop; echo ${$name}."<P>"; }
?>
So that would list all cookies entitled 'cookie1' through 'cookie10'...correct?
almost it will list cookie0 through to cookie9