Cookies are sent to the browser in the CGI header of your reply, so there's no way to set and retrieve a cookie in the same request. The way cookies work, they are sent to the browser in the reply of a request and are then returned by the browser as part of all subsequent requests to the same server.
Sent by Joe Cosby on 12/23/2002 12:50:14 PM:
So basically, there is no way to set a cookie in 1.29 without reloading the page, is that correct?
Setting a value to Cgi.Cookie isn't going to accomplish anything, as far as I can see.
As far as the code flow I am trying to achieve, if anybody has figured out a way to attempt to set the cookie, and then check whether or not the cookie was set, within the same code block, it would be greatly appreciated.