Solved

php POST "function"?

Posted on 2013-06-20
4
425 Views
Last Modified: 2013-06-20
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
Comment
Question by:ststesting
4 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39262756
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
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39262811
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
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39262821
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
 
LVL 2

Author Closing Comment

by:ststesting
ID: 39263105
This is exactly what I was looking for.

Thanks! (to everyone)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now