Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

php POST "function"?

Posted on 2013-06-20
4
Medium Priority
?
437 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 111

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 44

Accepted Solution

by:
Chris Stanyon earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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 …

722 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