[PHP] re-setting all cookies

2005-03-22 Thread AndreaD
I want a button that resets all my cookies. Can I reset them all with a foreach command? AD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] re-setting all cookies

2005-03-22 Thread Ken
/*From the php manual $arr = array(1, 2, 3, 4); foreach ($arr as $value) { $value = $value * 2; } */ $_COOKIE is a variable... but you need the key for setcookie(). so you can do: foreach($_COOKIE as $key = $value){ setcookie($key,, time()-3600); } i know there is the $value bit that we

Re: [PHP] re-setting all cookies

2005-03-22 Thread Burhan Khalid
Ken wrote: /*From the php manual $arr = array(1, 2, 3, 4); foreach ($arr as $value) { $value = $value * 2; } */ $_COOKIE is a variable... but you need the key for setcookie(). so you can do: foreach($_COOKIE as $key = $value){ setcookie($key,, time()-3600); } i know there is the $value bit