|
Posted by Andy Jeffries on 05/09/06 11:27
On Mon, 08 May 2006 20:53:38 -0400, Ron Croonenberg wrote:
> Hi all,
>
> cookies are stored in an array called $HTTP_COOKIE_VARS right ?
$_COOKIE is better.
> Is it possible to find a cookie if you know part of it's name ?
>
> For example the cookiename is firstname and I want to check all cookies
> that start with "first" in there name.
>
> I tried to work wih string and substrings, but that didn't seem
> to work ?
The answer is easy, but this is sounding a bit like homework... Post the
code you have and we'll help more.
As a hint, use foreach to iterate the $_COOKIE array, look at the key for
each item and compare it using either substr or regular expressions.
That should have given you enough terms to Google your way through it.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|