|
Posted by Erwin Moller on 05/09/06 11:14
Ron Croonenberg wrote:
> Hi all,
Hi,
>
> cookies are stored in an array called $HTTP_COOKIE_VARS right ?
Sometimes, it is an 'old' array, possibly not available in future version of
PHP.
Use $_COOKIE instead if you can.
read more here:
http://nl3.php.net/manual/en/reserved.variables.php#reserved.variables.cookies
>
> Is it possible to find a cookie if you know part of it's name ?
Yes.
Try this:
<pre>
<?php print_r($_COOKIE); ?>
</pre>
That will output to html, nicely formatted, what is in the cookiestring the
clientbrowser send along the request to your page.
>
> For example the cookiename is firstname and I want to check all
> cookies that start with "first" in there name.
Just examine the output of the above, and you'll figure out a way to search
for substrings. If not, come back here with some samplecode.
>
> I tried to work wih string and substrings, but that didn't seem
> to work ?
Show us what you tried, along with the content of $_COOKIE your script
received.
Regards,
Erwin Moller
[Back to original message]
|