Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

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...?)
0
ststesting
Asked:
ststesting
1 Solution
 
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
 
Chris StanyonCommented:
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
 
ststestingAuthor Commented:
This is exactly what I was looking for.

Thanks! (to everyone)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now