You are here: Re: Reading a cookie « PHP Programming Language « IT news, forums, messages
Re: Reading a cookie

Posted by Rik on 02/07/07 17:59

Jerim79 <mylek@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.
>>
>> > I tried that and it doesn't seem to work. For instance:
>>
>> Do a var_dump($_COOKIE);
>> If nothing is set, the browser probably did not send acookie, and you'll
>> have to check wether the cookie you're expecting is set correctly.
>
> Right, we don't want to set a cookie. EVER. We just want to READ a
> cookie that we create manually, ourselves.

And the cookie HAS TO BE SET, SOMETIMES, BY AN ARIBTRARY PROGRAM, SCRIPT
OR PERSON. If no cookie is set, or you've set it with the wrong
parameters, PHP will never receive it.

You cannot just expect something exists by just checking wether it exists.

> I know in javascript you can create a cookie manually and have
> javascript read it. We want to do that in PHP.

No, you just told me you did not want to create it. Get your plan straight.

--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация