What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Set Cookie wont work

Set Cookie wont work
Author: Message:
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
O.P. Set Cookie wont work
code:
<?php
$value = 'something from somewhere';

setcookie("TestCookie", $value);
echo $_COOKIE["TestCookie"];
?>



does anyone see any problems, or is there a any bugs that might stop setcookie  working.

i've googled to no avail.

im running EasyPHP 1.8 with Curl and php_mbstring plugins enabled.

any other information needed please post.
[Image: jeansiger5.jpg]
11-27-2005 08:33 AM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Set Cookie wont work
$_COOKIE['TestCookie'];

not

$_COOKIE["TestCookie"];
11-27-2005 08:59 AM
Profile PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Set Cookie wont work
quote:
Originally posted by Lee Jeffery
$_COOKIE['TestCookie'];

not

$_COOKIE["TestCookie"];
that makes no difference...


ashhhhhhhhh i told you COOKIES DONT APPLY TILL NEXT RELOAD so insert it into the $_COOKIE array yourself like

code:
setCookie('xxx','hawt');
$_COOKIE['xxx'] = 'hawt';



edit:

and if you look on the setCookie function page it says

quote:
Originally posted by http://php.net/setCookie

Once the cookies have been set, they can be accessed on the next page load with the $_COOKIE or $HTTP_COOKIE_VARS arrays. Note, autoglobals such as $_COOKIE became available in PHP 4.1.0. $HTTP_COOKIE_VARS has existed since PHP 3. Cookie values also exist in  $_REQUEST.


This post was edited on 11-27-2005 at 09:11 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
11-27-2005 09:09 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On