Forums
This topic is locked
Submit Cookie on Form Submit, capture form value
Posted 19 Jul 2002 15:50:04
1
has voted
19 Jul 2002 15:50:04 Mitchel Tendler posted:
I can set a cookie manually, and retrieve it with no problem, what I amtrying to do now is:
- figure out a way to capture the value of a form field, and apply that
value to a Cookie when the Form is submitted.
I tried:
<%
Response.Cookies("first_name" = Request.Form("first_name"
Response.Cookies("first_name".Expires = Date + 99
%>
Perhaps it has to do with the <Form>
it's:
<form METHOD="get" name="login" ACTION="step3.asp">
Or the placement of the COOKIE code?
Anyone have a tip or a link to a tutorial?
Thanks!
Mitch
Replies
Replied 19 Jul 2002 16:05:52
19 Jul 2002 16:05:52 Mitchel Tendler replied:
I got it.
Thought I would share <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
On the next page after the form "STEP3 of the process":
<%
Response.Cookies("first_name" = Request.QueryString("first_name"
Response.Cookies("first_name".Expires = Date + 999
Response.Cookies("last_name" = Request.QueryString("last_name"
Response.Cookies("last_name".Expires = Date + 999
Response.Cookies("email" = Request.QueryString("email"
Response.Cookies("email".Expires = Date + 999
Response.Cookies("telephone" = Request.QueryString("telephone"
Response.Cookies("telephone".Expires = Date + 999
%>
When in doubt...reboot!
Thought I would share <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
On the next page after the form "STEP3 of the process":
<%
Response.Cookies("first_name" = Request.QueryString("first_name"
Response.Cookies("first_name".Expires = Date + 999
Response.Cookies("last_name" = Request.QueryString("last_name"
Response.Cookies("last_name".Expires = Date + 999
Response.Cookies("email" = Request.QueryString("email"
Response.Cookies("email".Expires = Date + 999
Response.Cookies("telephone" = Request.QueryString("telephone"
Response.Cookies("telephone".Expires = Date + 999
%>
When in doubt...reboot!