RE: [PHP] Re: Testing if cookies are enabled
| From: | Ford, Mike [LSS] | Date: | Mon, 21 Jun 2004 11:21:07 +0000 |
| Subject: | RE: [PHP] Re: Testing if cookies are enabled | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188737@lists.php.net to get a copy of this message | ||
On 21 June 2004 12:11, Martin Schneider wrote:
> thanks for your reply, I think you missunderstood, please read more
> carefully. I know how to set and read a cookie, but as I
> wrote I wasn't
> able to set and text a cookie ON THE SAME PAGE.
>
> The manual says: http://php.net/setcookie
> "Once the cookies have been set, they can be accessed ON THE
> NEXT PAGE."
>
> But I have seen pages on which it seems they set und check if
> the cookie
> has been set ON THE SAME PAGE. So I want to know how they do that
> (perhaps with a 302-header or something like that?).
Yes, that's one possibility, but there'd still have to be at least one page
load involved before you'd see the cookie. What you describe makes it more
likely that there's actually some client-side technology involved, such as
JavaScript.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211