|
Posted by Rik on 02/07/07 17:21
Jerim79 <mylek@hotmail.com> wrote:
> On Feb 7, 10:46 am, Rik <luiheidsgoe...@hotmail.com> wrote:
>> Jerim79 <m...@hotmail.com> wrote:
>> > Okay, so we are going with cookies. The problem I have is that I don't
>> > know how to make PHP just read acookie.
>>
>> It's in the $_COOKIE array.
>> --
>> Rik Wasmus
>
> I tried that and it doesn't seem to work. For instance:
>
> <?php
>
> switch ($_COOKIE["printer"]) {
>
> case A:
> echo "Hello";
> break;
> case B:
> echo "Yes";
> break;
> case C:
> echo "No";
> break;
> case D:
> echo "Goodbye";
> break;
> }
> ?>
>
>
> That doesn't do anything.
Do a var_dump($_COOKIE);
If nothing is set, the browser probably did not send a cookie, and you'll
have to check wether the cookie you're expecting is set correctly.
--
Rik Wasmus
Navigation:
[Reply to this message]
|