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 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> 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> 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! 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
Archived
This topic is now archived and is closed to further replies.