blommer Posted November 13, 2009 Share Posted November 13, 2009 Hi, I have a form that I want to input variables from a URL into its textboxes but still submit the form manually via POST. Here is my form right now: <?php echo '<br>' ; echo '<form method="post" action="index.php">' ; echo 'School: <input name="school_name" id="school_name" type="text"><br>' ; echo '<br>' ; echo 'City: <input name="city_name" id="city_name" type="text"><br>' ; echo '<br>' ; echo '<input name="send" id="send" type="submit" value="Enter">' ; echo '</form>' ; ?> To fill the textboxes I would like the to be able to type a url like: http://www.templeton.com/schools.php?&school_name=Jenkins&city_name=Chicago and be able to fill the form with "Jenkins" and "Chicago." Any ideas on how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/181341-pass-variables-into-form-but-still-use-post-to-submit/ Share on other sites More sharing options...
mikesta707 Posted November 13, 2009 Share Posted November 13, 2009 if you submit a get to the page the form is on, you can just do something like $textbox = '<input .... value="'.$_GET['school_name'].'".. >'; Quote Link to comment https://forums.phpfreaks.com/topic/181341-pass-variables-into-form-but-still-use-post-to-submit/#findComment-956638 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.