Solved

Linking to a new page from a php program

Posted on 2012-04-02
3
377 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
[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
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 110

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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

717 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