• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

how to link to new html page

Have html data entry form for MySQL. The php is in-line in the html form. ( So, just <form> ) Need it to jump to new page URL after submit clicked and code gets executed between <? and ?>. Seems simple...
1 Solution
confused, can u give me the code details?
So, what's the question? If I understand correctly, you want PHP-code executed when submitted and also a new page URL opened. Well, something like this maybe?

the form :

<form name="myForm" method="post" action="mypage.html">
  <input type="submit" name="mySubmit" value="Submit">

then after the form the PHP-code :

if ($mySubmit) {

So now, when pressed on the submit button the page mypage.html will be opened and the php-code will be executed.


You can also cause the browser to jump to a new page by entering this code.

header("Location: http://www.someurl.com/somefile.html");

Make sure that your php code doesn't try to print anything before this line of code.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

erikfriend >> better post something like this as a comment, since this isn't THE answer and Dhalgren hasn't evaluated our comments yet, and also the question now is locked, so no other experts can help the questioner out directly. Hope you'll do this from now on.

"and also the question now is locked, so no other experts can help the questioner out directly. "

What? just anter you answer as a comment, you DO know that EE now has a "accept comment as answer" button these days?
Yes, I do know, but I hope Dhalgren knows too.
DhalgrenAuthor Commented:
I had it print a meta tag refresh from with the PHP. The other problem was that I had to do it inside of a frame.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now