Forum Moderators: coopster
I currently have a PHP problem. Firstly this is the situation I am currently in:
1. There is a form where the user fills in their details and clicks 'next'.
2. These details are then sent to a php page where the fields are emailed to a set email address and the values from the first form are sent to a payment page with code that ends:
header("Location: https://www.paymentpage.com/index.php?grand_total=$grand_total&billing_first_name= $billing_first_name&billing_last_name=$billing_last_name&billing_email=$billing_email &billing_phone=$billing_phone&billing_address=$billing_address&billing_address2= $billing_address2&billing_city=$billing_city&billing_state=$billing_state&billing_province= $billing_province&billing_zip=$billing_zip&billing_country=$billing_country");
Now this works fine apart from the fact that the payment page doesn't like the values being passed this way. They say that it has to be done using post. Can this somehow be achieved.
Please be gentle as I don't know much about PHP!
Cheers
James
[edited by: jatar_k at 5:26 pm (utc) on May 17, 2004]
[edit reason] broke url to fix sidescroll [/edit]
This is just a simple code, I using to connect to authorize.net
***************************************
$ch=curl_init("https://secure.authorize.net/gateway/transact.dll");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); // set the fields to post
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // make sure we get the response back
$buffer = curl_exec($ch); // execute the post
curl_close($ch); // close our session
***************************************
At the $fields, you should put all of your variables.
At $buffer you will have the results or the server output.
Note, your server must support cURL functions and the PHP must be compilied with curl.
In your form you have something like this:
<form id="update" method="post" action="update.php">
<input name="email" type="text">
etc...
$email= $_POST['email'];
[edit]woops, didn't see the SSL part. Wasn't sure what you wanted to know exactly.[/edit]
http://www.example.com/index.php?grand_total=12.95&first_name=colin
Cheers
James
[edited by: jatar_k at 5:27 pm (utc) on May 17, 2004]
[edit reason] generalized url [/edit]