Problem with form processing...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lcmp
Forum Newbie
Posts: 4
Joined: Thu Jun 10, 2004 11:03 pm

Problem with form processing...

Post 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!!
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post 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.
Post Reply