Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Front Page Confirmation field to variable

Status
Not open for further replies.

DH

Programmer
Dec 8, 2000
168
After a user submits a Front Page 2000 form the user is presented with a confirmation page.

This confirmation page displays the form field "tcontactname" by using the following coding"
<!--webbot bot=&quot;ConfirmationField&quot; S-Field=&quot;tcontactname&quot; -->

I would like to pass the value of this confirmation field into a variable using VBScript or ASP so I can then evaulate the variable and execute code depending on the variables value.

Any suggestions?

Thanks,

DH
 
Hi DH,

Are your trying to get the value from one of your form fields? Say you are trying to get the first name of that somebody. In your form you should have something like this <input type=&quot;text&quot; name=&quot;firstname&quot;> right? Now at the top of the page where your form is enter this:

<%
'Creating a cookie to remember user's first name
Dim Fname
Fname=Request(&quot;firstname&quot;)
Response.Cookies(&quot;firstname&quot;) = Fname
%>


Now in the page where you want to request/display the variable first name, put this

<%
Dim FName
FName = Request.Cookies(&quot;firstname&quot;)
Response.Write &quot;&quot; & FName & &quot;!&quot;
%>

Here is a working example, say you want to personalize your thank you for registering at your site page to have their name, here is how you would do it:

Thank you for registering at DH's site <%
Dim FName
FName = Request.Cookies(&quot;firstname&quot;)
Response.Write &quot;&quot; & FName & &quot;!&quot;
%>!

When that code is run live, and I, JoJoH has just registered at your site, than you will have the result &quot;Thank you for registering at DH's site JoJoH!&quot;

*Make sure you have this at the top of the pages where you want to have those codes <%@LANGUAGE=&quot;VBSCRIPT&quot;>

Hope this helps!

Cheers,
JoJoH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top