Hey

I am making a e-commerce site that has the option to pay by credit card or bank wire.

So in my form I have :

<form action="<? $_SERVER['PHP_SELF']; ?>" method=POST ...

<input type="radio" name="howPay" value="cc">Credit card
<input type="radio" name="howPay" value="bankwire">Bank wire

ok so on top of my php:

   if ($_POST['howPay'] == 'cc') {
     header('Location:https://some.payment.gateway');
     exit();
  } else if ($_POST['howPay'] == 'bankwire') {
   header('Location:my_bankwire_page.php?id='.$_GET['id']);
  exit();
 }

have tested a variable page and not receiving any post varaibles via header(Location method is there another way to do this?

Because I obviously dont want to redirect straight to the payment gateway if someone has selected bankwire?

any help or ideas would be great....

    phpjaco wrote:

    have tested a variable page and not receiving any post variables via header(Location method is there another way to do this?

    Because u send them through GET ...

    If u want to send them through POST use a form ...

      to save time. i just split them up (bankwire && cc) into two forms, so that seems to be doing ok.

      thanks for the article on CURL, Client URL Library Functions.

        Write a Reply...