Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linking to a new page from a php program

Posted on 2012-04-02
3
Medium Priority
?
383 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 1600 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 400 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

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.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

636 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