Re: Retrieving Info from Cookies
| From: | Justin French | Date: | Wed, 05 Jun 2002 07:10:11 +0000 |
| Subject: | Re: Retrieving Info from Cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100664@lists.php.net to get a copy of this message | ||
try wrapping the vars inside curly braces {$_COOKIE['var']} when using them
inside strings.
eg
echo "your username is {$_COOKIE['uid']}<BR>\n";
Justin French
on 05/06/02 3:22 PM, Tom Ray (tom@blazestudios.com) wrote:
> when I do that it comes up with
>
> Parse error: parse error, expecting
T_STRING' or
> T_VARIABLE' or
> `T_NUM_STRING'
>
>
> Justin French wrote:
>
>> you should be able to access it via $_COOKIE['name'], or what I do, $cookie
>> = $_COOKIE['name'].
>>
>> Justin French
>>
>>
>> on 05/06/02 2:19 PM, Tom Ray (tom@blazestudios.com) wrote:
>>
>>
>>
>>> I've been playing with cookies, and I've been able to write information
>>> to a cookie, but now what I want to do is pull that information from the
>>> cookie. Is there something special I need to do to pull that info or
>>> should I just be to get that data by delcaring a variable in the php
>>> script?
>>>
>>>
>>>
>>
>>
>> .
>>
>>
>>
>
>