Solved

Linking to a new page from a php program

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
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 …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

785 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