#1 (permalink)  
Old 04-11-2006, 05:52 AM
Registered User
 
Join Date: Mar 2006
Posts: 8
passing information from 1 form to another

Hi,

I have two forms, the second of which is in the html of the .cgi which results from the first form.

Ie they fill in the first form, which is on a .html file. Clicking submit sends me an email and takes them to thankyou.cgi.

This thankyou.cgi file has a second form on, through which the user can submit another query, without having to input their contact details again (as they've already done it on the first form).

So... Im trying to get the second form-to-email to automatically include information from the first form.

On the first form, the fields I want the 2nd to pick up are:
<input type="text" name="name" maxlength="70" size="30" style="color:#000099" />
<input type="text" name="phone" maxlength="12" size="30" style="color:#000099" />

So on my second form, the fields for obtaining the info from the first are:
<input type="hidden" name="name" value="<%=request.form("name")%>">
<input type="hidden" name="phone" value="<%=request.form("phone")%>">

And submitting the 2nd form sends me an email, and again returns them to the thankyou.cgi page (where they can submit another, if they so wish!!)

However the email I receive from the 2nd form sends the value "<%=request.form(" to me, rather than bringing the info from the first form.

I got the value="<%=request.form("name")%>"> code from another forum, for asp.

Does this passing of info work in .cgi -- if so, what am i doing wrong?!!

Thanks very much in advance
amx
Reply With Quote

  #2 (permalink)  
Old 04-11-2006, 11:12 AM
Deadeye's Avatar
Moderator
 
Join Date: Aug 2005
Location: San Diego, CA
Posts: 274
Send a message via MSN to Deadeye
I know how to do this in PERL if your interested. I'm not sure what a language a .cgi file is
Reply With Quote
  #3 (permalink)  
Old 04-12-2006, 04:15 AM
Registered User
 
Join Date: Mar 2006
Posts: 8
perl

perl extensions can be .cgi or .pl - my server prefers .cgi but i dont think it makes any difference....

amx
Reply With Quote
  #4 (permalink)  
Old 04-12-2006, 04:59 PM
Deadeye's Avatar
Moderator
 
Join Date: Aug 2005
Location: San Diego, CA
Posts: 274
Send a message via MSN to Deadeye
sounds good, I'm used to working w/ PERL in .pl or .sh :P

but to grab data from a submited form form another page you will use the following code

Code:
$variable = param("form name");
this will grab, file streams, string, intigers, and just about everything

In your code to auto fill the same form fields you will just do something like this
[code]
print "<input type='text' value='$variable'>";

This will auto fill that information in the new field. I hope this makes sence.

Wesley
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
strip carriage returns & linefeed characters from form field amanxman Programming and Scripting 2 03-30-2006 07:52 AM
Spam/Junk Form Output amanxman Programming and Scripting 4 03-29-2006 10:28 AM
Problems with Form Emailer kev989 Programming and Scripting 8 01-02-2006 12:42 PM
Store Form Focus As Variable? curtiss Programming and Scripting 1 09-30-2005 10:41 AM
Really lame Javascript form submission problem pillsbur Programming and Scripting 1 04-19-2005 11:13 AM


All times are GMT -5. The time now is 06:02 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter