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

Posted by Jerim79 on 02/07/07 19:21

On Feb 7, 1:03 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
> Jerim79 <m...@hotmail.com> wrote:
> > On Feb 7, 12:11 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
> >> Jerim79 <m...@hotmail.com> wrote:
> >> > When you say "set thecookie" I take that to mean setcookie(). I don't
> >> > want setcookie(). I want to create thecookiemanually. So I can
> >> > create thecookiecalled "printer" manually and use
> >> > $_COOKIE['printer'] to read it?
>
> >> Yup, manually, with javascript, with an arbitrary application, no
> >> matter.
> >> As long as acookieis sent PHP can read it. It does not matter how
> >> this cookiecame to be, just that it's there.
>
> > When you say "sent" what are you referring to?
>
> Read up on how cookies work. A server has to get the (contents of the) cookie, how else could you make any decisions on the server based on a cookie? When requesting a page from a server, browsers can send the
> contents of available cookies in the header of the HTTP(S) request.
>
> > Lets say I create a file on my computer called "printer". Inside that
> > file I manually type something like: printer=A. How would I send that
> >cookieto the PHP form?
>
> The browser takes care of it, and the way and where it stores the cookies
> is hence browser dependant. So to know how to manually create one and
> where to store it you'll have to consult the manual of the browser.
> --
> Rik Wasmus

I guess what I meant to say was "how do you send a cookie to the PHP
form from the client computer?" If I put the cookie in the location
where the browser stores all its cookies, would that mean that the
cookie is accessible by the form, automatically? Does the $_COOKIE[]
array load all cookies in that browser's cookie location? If not, then
how do I make my PHP form aware of the cookie?

 

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

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