Solved

Linking to a new page from a php program

Posted on 2012-04-02
3
370 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

758 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

21 Experts available now in Live!

Get 1:1 Help Now