Click to See Complete Forum and Search --> : Passing one form field value to another


JS=Freak
06-01-2006, 01:55 AM
I've got a normal Dreamweaver template-based page with a column on the right hand side. This column has an email subscription form with one input field and a submit button. What I basically want to do is have the user put in their email address and by hitting submit that would take them to a new page. For that I used GET url and it works 100%.

On the next page they would have to fill in personal details. On this page is also a field for email but I want the email address they entered in the first form to be brought over to the new form. So they don't have to type it in again.

You might be asking, "why have two forms?". My boss wants it this way so I must make it work. Any help would be appreciated!!


Karen

bathurst_guy
06-01-2006, 02:12 AM
What server side language are you using - or what are you using to process and store the subscription information?

JS=Freak
06-01-2006, 02:34 AM
I'm currently using this:

action="/cgi-sys/cgiemail/contact.txt"

The TXT fields look like this:

Name and Surname: [name]
Contact Number: [number]
Email address: [email]
Questions/Comments: [comments]

The info then gets sent to me via email that's specified in the header of the TXT.

bathurst_guy
06-01-2006, 02:38 AM
Do you have PHP installed?

To check, create a file named info.php with the following code inside it
<?php phpinfo(); ?> and upload it to your server, then access it via your browser. If lots of information appears, you have it installed, otherwise not.

JS=Freak
06-01-2006, 02:49 AM
I currently have PHP Version 4.3.11 installed.

JS=Freak
06-01-2006, 04:16 AM
Is there any way to do this without PHP? I have no knowledge of it.

ray326
06-01-2006, 11:14 PM
You'll have to use something on the server to generate portions of your pages on the fly. PHP is better for that than Perl, which is probably the language used for the formmail handler.

pcthug
06-02-2006, 02:24 AM
// php would be ideal to handle your request
$email = urldecode($_GET['email']);

kiwibrit
06-02-2006, 02:38 AM
JS=Freak, if you want an off-the-shelf php form handler, thesite wizard's (http://www.thesitewizard.com/wizards/feedbackform.shtml) is pretty self explanatory.