title: PHP Redirect with POST data
body: <p>I did some research on this topic, and there are some experts who have said that it is not <a href="https://stackoverflow.com/questions/3045097/php-redirect-and-send-data-via-post">possible</a>, so I would like to ask for an alternative solution.</p>
  
  <p>My situation:</p>
  
  <p>Page A: [checkout.php] Customer fills in their billing details.</p>
  
  <p>Page B: [process.php] Generate an invoice number and store customer details in database.</p>
  
  <p>Page C: [thirdparty.com] Third Payment Gateway (ONLY ACCEPT POST DATA).</p>
  
  <p>Customer fills in their details and sets up their cart in Page A, then POSTs to Page B. Inside process.php, store the POSTed data inside the database and generate an invoice number. After that, POST the customer data and invoice number to thirdparty.com payment gateway. The problem is doing POST in page B. cURL is able to POST the data to Page C, but the problem is the page didn't redirect to page C. The customer needs to fill in Credit Card details on Page C.</p>
  
  <p>The third party payment gateway did give us the API sample, the sample is POST the invoice number together with customer detail.
  We don't want the system to generate an excess of unwanted invoice numbers.</p>
  
  <p>Is there any solution for this?
  Our current solution is for the customer to fill detail in Page A, then in Page B we create another page showing all the customer details there, where the user can click a CONFIRM button to POST to Page C.</p>
  
  <p>Our goal is for customers to only have to click once.</p>
  
  <p>Hope my question is clear :)</p>