php POST "function"?

I have a form that calls a function that inserts the fields in a database.

I can also POST that information to a payment processing company's page.

How can I do both? (and in that order...?)
LVL 2
ststestingAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Chris StanyonConnect With a Mentor Commented:
Submit your form to your database function, and from that function make a new POST request to the Payment Gateway. Here's an idea on how to POST from PHP:

http://www.lornajane.net/posts/2010/three-ways-to-make-a-post-request-from-php
0
 
Ray PaseurCommented:
Please post the code that shows your progress on this question.

Also, please see the comment in this question.  I think it would be good to explain what happened there.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28044975.html#a39262764
0
 
Jagadishwor DulalBraces MediaCommented:
As Ray write better to post the progress code:
<?php
if(isset($_POST['yoursubmit'])){
//Fetch all data from form like
$fname=$_POST['fname']; //assume you are using fristname
$lname=$_POST['lname'];
//call here the	insert function
//if insert is success post values to the payment process as you can see the values are in variables now
	
}

Open in new window

0
 
ststestingAuthor Commented:
This is exactly what I was looking for.

Thanks! (to everyone)
0
All Courses

From novice to tech pro — start learning today.