Cookies, Cookies - Got the Setting but Now the Getting

Gregory Lypny gregory.lypny at videotron.ca
Wed Aug 18 14:05:16 EDT 2010


Hi Pierre,

Thanks for responding.  I'm afraid that unquoting makes no difference here.  The first two below do not work but the third one does.

(1)  If I set a new cookie using PUT NEW HEADER and then retrieve all cookies using GET $_SERVER[HTTP_COOKIE] all in the same irev script as part of a POST form action then the new cookie is set successfully but the cookie retrieved is the previous one, that is, same name but previous value.

(2)  If I set the new cookie as in (1) above but instead retrieve them by embedding an irev script with PUT $_SERVER[HTTP_COOKIE] in the HTML of arbitrary pages, then those pages, when loaded, will either not show the cookie with the name I have set (but will show cookies with other names from the same domain), or will show the cookie with the name I have set but with it's previous value.

(3)  This works.  If instead of (2), I retrieve the cookies by using hyperlinks will full HTTP paths to a script with PUT $_SERVER[HTTP_COOKIE] in it, then the most recently set cookie is retrieved.  And the page with the hyperlink does not need to be a form page.

I tested these by setting the cookie's value to the long seconds and logging them.  That way, I was always able to compare the most recent value to the previous one.


Regards,

Gregory


On Wed, Aug 18, 2010, at 12:25 PM, Pierre wrote:

> Message: 10
> Date: Wed, 18 Aug 2010 02:30:03 +0200
> From: Pierre Sahores <psahores at free.fr>
> Subject: Re: Cookies, Cookies - Got the Setting but Now the Getting
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <EC4E4080-2F1E-4DC6-A236-013ABF3D5B53 at free.fr>
> Content-Type: text/plain; charset=iso-8859-1
> 
> Hi Gregory,
> 
> try : 
> 
> get $_SERVER[HTTP_COOKIE] 
> 
> without quoting HTTP_COOKIE
> 
> Works fine there.
> 
> HTH,
> 
> Pierre




More information about the use-livecode mailing list