Forum Moderators: coopster
I have a new merchant account, and I need to submit data to my CC processor via an html form. Right now, there are no input fields on it (only some hidden ones) because I chose for the customer to fill out all their info at the CC processor site
This merchant processor also accepts echecks and I also accept paypal . Action url for check and CC is different (and of course the html code is totally different for the paypal). What I would like to do, via php, is to generate diferent html code based on the checkmark checked by the user and submit it.
I understand how to generate the php page with the correct html code, but what I still need is automatic "submit" action - equivalent of submit button action, but not having the user click on anything.
Any help is greatly appreciated
Thanks
Coopster,
Yes that is what I was trying to say ... I will look at the examples that you were referring to
Thanks
Ultimately it doesn't matter to me whether it is PHP or Javascript or something else as long as it does the job
Submit your form to your PHP script and then use a simple if-else to go to the correct location.
Example:
<?php
if ($paymentprocessor == "PayPal")
{
header("Location: h^tp://www.paypal.com/your/formatted/link/here");
} else {
header("Location: h^tp://www.otherguy.com/your/formatted/link/here");
}
?>
Hope that helps out.
Birdman