Forum Moderators: coopster

Message Too Old, No Replies

Form to submit to another form

Form to submit to another form

         

patmagpantay

4:43 pm on Jul 20, 2008 (gmt 0)

10+ Year Member



I made a form in my website (PHP), I would like it so that when the submit button is clicked the data on my form fields will be forwarded to another form on my shopping cart page? Thanks in advance!

ag_47

5:09 pm on Jul 20, 2008 (gmt 0)

10+ Year Member



Print your old form input/values as hidden fields inside the new form.

patmagpantay

6:03 pm on Jul 20, 2008 (gmt 0)

10+ Year Member



I'm sorry for sounding so much of a noob :( here's my form :

<form action="" method="get">
<table width="250" border="0">
<tr>
<td>Name</td>
<td><input name="name" type="text" class="textfield" id="name" /></td>
</tr>
<tr>
<td>E-mail</td>
<td><input name="email" type="text" class="textfield" id="email" /></td>
</tr>
<tr>
<td>Zip</td>
<td><input name="submit" type="text" class="textfield" id="submit" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Sumbit" id="Sumbit" value="Submit" />
<input type="reset" name="Reset" id="Reset" value="Reset" /></td>
</tr>
</table>
</form>

And here is the link where i'd like the values of my form to be passed when the submit button is passed.

<snip>

[edited by: eelixduppy at 6:07 pm (utc) on July 20, 2008]

[edited by: dreamcatcher at 11:05 pm (utc) on July 20, 2008]
[edit reason] No urls please! [/edit]

ag_47

1:09 am on Jul 21, 2008 (gmt 0)

10+ Year Member



errm, not sure what your question is, but what i meant is in the new page/script:

<form name="newform" .. > <?php

if( !empty($_POST['Sumbit']) ){ //You used 'Sumbit' as the name. Try to come up with better ones..
echo "
<input type='hidden' name='name' value=".$_POST['name']." />
<input type='hidden' name='email' value=".$_POST['email']." />
<input type='hidden' name='submit' value=".$_POST['submit']." />";
}
?> ..rest of the form...