Solved

php POST "function"?

Posted on 2013-06-20
4
436 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 110

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

632 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