frankstr Posted February 1, 2007 Share Posted February 1, 2007 LS I made a form in PHP After completion of the form the data of the users are added to a MYSQL database. The user gets the message "your data were added" So far so good. After this I want to link the user to another page. I tried withhout succes <input type="hidden" NAME="OK_PAGE"VALUE="mypage.php"> So far the script stops at the message "your data were added" What to do? Is there a tutorial? tnx frank Link to comment https://forums.phpfreaks.com/topic/36668-solved-link-to-another-page/ Share on other sites More sharing options...
metrostars Posted February 1, 2007 Share Posted February 1, 2007 Never heard of that working before, just a form variable. What you can do if the code is placfed outside of the 'head' tags is just use <?php header("Location: 'http://www.example.com'"); ?> Link to comment https://forums.phpfreaks.com/topic/36668-solved-link-to-another-page/#findComment-174791 Share on other sites More sharing options...
Balmung-San Posted February 1, 2007 Share Posted February 1, 2007 You can always use a meta refresh as well. Just google that and you'll get tons of hits. Also, be careful. You cannot output anything before using header(). Link to comment https://forums.phpfreaks.com/topic/36668-solved-link-to-another-page/#findComment-174793 Share on other sites More sharing options...
ShogunWarrior Posted February 1, 2007 Share Posted February 1, 2007 Using: <?php header("Location: mypage.php"); ?> Is the easiest and fastest option. Link to comment https://forums.phpfreaks.com/topic/36668-solved-link-to-another-page/#findComment-174812 Share on other sites More sharing options...
frankstr Posted February 1, 2007 Author Share Posted February 1, 2007 LS Thnx it works But it raised a new question The new page location ik linked to is the next part of the form. I have to go on with the same id. When I just jump to the other form a new id is created in the MYSQL database. Is there a way to redirect to the next page ofe the same form without creating a new id? thnx Frank Link to comment https://forums.phpfreaks.com/topic/36668-solved-link-to-another-page/#findComment-174997 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.