Solved

Linking to a new page from a php program

Posted on 2012-04-02
3
371 Views
Last Modified: 2013-11-19
I have a form that inserts to a database. When submit is hit, then another program insert.php is called where the database is updated. I then want to call a page for payment processing. Can I do this in the insert.php program or the program that has the form
Thanks
0
Comment
Question by:Hidesign
3 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 400 total points
ID: 37798580
>> Can I do this in the insert.php program

Yes.  At some point in the insert.php script a query is executed that inserts the data.  After that code, just add something like:

header("Location: paymentpage.php");

to redirect.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 100 total points
ID: 37798958
Can I do this in the insert.php program...
Yes, that is the correct place to do it.  The insert.php script has received all of the client input.  It can update the data base and then it can continue its work by loading the page that handles payment processing.  I think I would want these two processes to be part of the same script since the variables from the form (used to update the data base) are already present in the scope of the insert.php program script.
0
 

Author Closing Comment

by:Hidesign
ID: 37799498
Thanks - the code
header("Location: paymentpage.php"
worked great
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

930 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

14 Experts available now in Live!

Get 1:1 Help Now