On 27 Nov 2001 [EMAIL PROTECTED] wrote:

> -> cookie2.php
>
> <?php
>
>         $cookie = $HTTP_COOKIE_VARS[CookieName];
>         echo $cookie;
>
> ?>
>
> that's exactly the test script i'm using.
>
> Is there anything wrong with the above?

You should use quotes:

$cookie = $HTTP_COOKIE_VARS['CookieName'];

but that should not affect anything.

Derick


>
>
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2001-11-27 13:43:03] [EMAIL PROTECTED]
>
> setcookie ('CookieName', 'CookieValue', time()+7200);
> works. If not you're doing something wrong.
> This is NOT a bug in PHP. Ask further support-questions on the appropriate 
>mailinglist ([EMAIL PROTECTED]).
>
>
>
> ------------------------------------------------------------------------
>
> [2001-11-27 13:40:30] [EMAIL PROTECTED]
>
> ANd now .... it's not working again.
>
> Suggestions please!
>
> ------------------------------------------------------------------------
>
> [2001-11-27 13:03:44] [EMAIL PROTECTED]
>
> Setting a pre-defined value for the time aspect works, however ... just to let you 
>guys know, if you put
>
> setcookie ($mycookie, $myvalue, time()+7200);
>
> on my box, and several others that we use, it wont set that cookie!!
>
> fyi :)
>
> thanks for your help
>
> ------------------------------------------------------------------------
>
> [2001-11-27 13:00:03] [EMAIL PROTECTED]
>
> yes there are quotes in the line.
>
> If you remove the quotes, the cookie doesn't initialize at all. Should we be 
>assigning a variable there instead for example :
>
> $mytime = time() + 7200;
>
> setcookie ("coookiename", "cookievalue", $mytime); ?
>
> There have been tones of posts in your setcookie function information about the 
>cookie not working at all if you do not put the "" in there.
>
>
>
> ------------------------------------------------------------------------
>
> [2001-11-27 12:56:31] [EMAIL PROTECTED]
>
> (switched to feedback status)
>
> ------------------------------------------------------------------------
>
> The remainder of the comments for this report are too long. To view
> the rest of the comments, please view the bug report online at
>     http://bugs.php.net/?id=14255
>
>
> Edit this bug report at http://bugs.php.net/?id=14255&edit=1
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to