Hi All,
I'm fairly new to php and i'm not sure if it's easy to do this in PHP or not but here is what I'm trying to do:
Have a form on page A which submits to page B (a php page). Page B automatically adds several form variables and then posts the form data through to Page C.
To be more specific:
The Form on Page A:
<FORM METHOD="POST" ACTION="
http://www.myserver.com/pageB.php" onSubmit="return ValidateForm(this)" >
<input type="hidden" name="unit1" value="dataone">
<input type="hidden" name="unit2" value="1">
<TABLE cellpadding="3" cellspacing="3">
<TR><TD><strong>First Name</strong> </TD><TD><input TYPE="text" name="name" size="20"></TD></TR>
</table>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit">
</form>
Then this will submit to Page B. Page B will then automatically append some more hidden form fields based on the value of 'unit2' from the page before (so unit2 could be 1, it could be 2, 3 etc).
So, lets say the value is 1 and we then need to append:
<input type="hidden" name="unit3" value="phone">
<input type="hidden" name="unit4" value="address">
Then this page B should automatically post ALL the form data (including the data from Page A) to a new address,
http://www.anotherserver.com/recipient.phpI would rather that Page B posts all the form data using PHP rather than using Javascript.
If you have any suggestions please let me know.
Thanks!
Brad
Start Free Trial