Trouble Setting Cookies
Gregory Lypny
gregory.lypny at videotron.ca
Sat Aug 14 19:26:04 EDT 2010
Thank you, Andre,
That's very kind of you.
Go to http://pareto.on-rev.com/setcookie.irev
This page has a one-button form that sets a cookie by calling a script called sSetCookie.irev. The cookie's name is testCookie and it's value is 666. Here is the script.
<?rev
put "Set-Cookie:" && "testCookie" & "=" & 666 & ";path=/" into theCookie
put new header theCookie
put url ("file:cookieResult.html") into thePage
put "Done." && the long date && the long time into theMessage
replace "{message}" with theMessage in thePage
put thePage
?>
Clicking the button takes you to
http://pareto.on-rev.com/sSetCookie.irev -- (cookieResult.html)
This is the page you will land on if the script in 1 above ran. It has a button that will load another page that calls a script to show what you what cookies you have from the on-rev server. The page uses an include statement in an HTML object to invoke the following script:
<?rev
put $_SERVER["HTTP_COOKIE"] into theCookies
put theCookies
?>
Thanks again for having a look,
Gregory
On Sat, Aug 14, 2010, at 1:00 PM, use-revolution-request at lists.runrev.com wrote:
> Message: 6
> Date: Fri, 13 Aug 2010 20:18:50 -0300
> From: Andre Garzia <andre at andregarzia.com>
> Subject: Re: Trouble Setting Cookies
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID:
> <AANLkTi=aiUhSA2U2T0Nnsqn6SD18svWA+ckDco=BtmiF at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Gregory,
>
> If possible, send me the url for the offending page, let me look at the
> headers. cookies are annoying believe me.
>
> For example, I think you might need a space between the colon and the cookie
> key name...
>
> (an && instead of &)
>
> Andre
More information about the use-livecode
mailing list