vampke Posted July 31, 2007 Share Posted July 31, 2007 How can I achieve this: page 1 has a form with textfield1, after clicking submit, page 2 is loaded with another form that also contains textfield1. Can the data that is entered in textfield1 on page 1 automatically be put in textfield1 on page 2? I'm sure it can, I just don't know how Quote Link to comment https://forums.phpfreaks.com/topic/62645-transport-form-data-to-next-page/ Share on other sites More sharing options...
jitesh Posted July 31, 2007 Share Posted July 31, 2007 Have you configured PHP ? page1.php <form name="page1" action="page2.php" method="post"> <input type="text" name="textfeild1" value="testvalue"> <input type="submit" name="submit" value="submit"> </form> page2.php <?php $textfeild1 = $_POST['textfeild1']; ?> <form name="page2" action="page3.php" method="post"> <input type="text" name="textfeild1" value="<?php echo $textfeild1;?>"> <input type="submit" name="submit" value="submit"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/62645-transport-form-data-to-next-page/#findComment-311809 Share on other sites More sharing options...
DeadEvil Posted July 31, 2007 Share Posted July 31, 2007 optimized... page1.php <form name="page1" action="page2.php" method="post"> <input type="text" name="textfield1" value=""> <input type="submit" name="submit" value="SUBMIT"> </form> page2.php <form name="page2" action="page3.php" method="post"> <input type="text" name="textfield1" value="<?=$_POST['textfield1']?>"> <input type="submit" name="submit" value="submit"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/62645-transport-form-data-to-next-page/#findComment-311813 Share on other sites More sharing options...
vampke Posted July 31, 2007 Author Share Posted July 31, 2007 thanks guys! I'll give it a shot! Quote Link to comment https://forums.phpfreaks.com/topic/62645-transport-form-data-to-next-page/#findComment-311924 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.