ded Posted April 5, 2008 Share Posted April 5, 2008 Hello All, Clicking the submit button in a form I created calls post.php. I would like the post.php to also reload back to the form holding some of the information previously entered within the fields. Is this possible? Thanks, DED Link to comment https://forums.phpfreaks.com/topic/99637-back-1-page-to-form/ Share on other sites More sharing options...
Caesar Posted April 5, 2008 Share Posted April 5, 2008 Hmmm....you mean something like: <?php if(isset($_POST['submit'])) { process_form('userinfo'); } echo' <form method="post" action="'.$_SERVER['PHP_SELF'].'" /> <table> <tr><td><input type="text" name="name" value="'.$_POST['name'].'" /></td></tr> <tr><td><input type="submit" name="submit" value="Submit" /></td></tr> </table> </form>'; ?> Where the form submits to the same page and the user's info is still retained in the form? Link to comment https://forums.phpfreaks.com/topic/99637-back-1-page-to-form/#findComment-509711 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.