Page 1 of 1

Problem with form processing...

Posted: Tue Jul 27, 2004 12:25 pm
by lcmp
Hello all,
I need to write the code for a form that will automatically populate the input fields of another form in a credit card payment gateway. So far nothing works!! Its driving me crazy..
This is a snapshot of the form to be automatically filled out in the payment gateway:

Image

The idea is to have another form within the site which already has the merchant ID and password hidden from the clients. So they can fill out all the information the gateway needs to process their request. Then when they submit the other form it should send all this info to the form in the snapshot so that the server can process the data.. I´ve tried all sorts of configurations but it doesn´t work. Any help in this matter will be deeply appreciated.

THANX!!

Posted: Tue Jul 27, 2004 12:42 pm
by d3ad1ysp0rk
form1.php

Code: Select all

<form action="form2.php" method="post">
<input type="text" name="var1" /><br />
<input type="text" name="othervar" /><br />
<input type="submit" name="submit" value="Next form.."  />
</form>
form2.php:

Code: Select all

<form action="whatever.php" method="post">
<input type="text" name="var2" value="<?php echo $_POST['var1']; ?>" />
<input type="text" name="othervar2 value="<?php echo $_POST['othervar']; ?>" />
<input type="submit" value="submit">
</form>
And if it's not the next page, you can use sessions, sql queries, cookies, etc..

Just make sure you don't save the password/pin as well, just the rest of the data.