pixelninja Posted May 28, 2008 Share Posted May 28, 2008 I dont even know where to begin or what you would call this type of thing... I was wanting to make something simple where the user would type in a name and when they submitted it would simply bring them to a URL with the name they submitted in a certain spot.. example: user inputs pixelninja into the input field and when they click submit it would go to http://google.com/somethinghere.pixelninja where it would simply add pixelninja to the certain spot in the URL.. Does this make sense I have seen it before Im sure its simple to do but i cant seem to get it. Thanks for any help Link to comment https://forums.phpfreaks.com/topic/107555-solved-help-with-a-simple-get-input/ Share on other sites More sharing options...
nloding Posted May 28, 2008 Share Posted May 28, 2008 Put this at the top of your form, and have the action be the URL of the form itself: <?php if(isset($_POST['submit'])) { $url = "http://www.whatever.com/folder/thingy/" . $_POST['url'] . "/morefolders/"; Header("Location: $url"); ?> Obviously make sure you edit the POST variables to the correct names ... Link to comment https://forums.phpfreaks.com/topic/107555-solved-help-with-a-simple-get-input/#findComment-551313 Share on other sites More sharing options...
pixelninja Posted May 28, 2008 Author Share Posted May 28, 2008 thanks bud exactly what i was looking for Link to comment https://forums.phpfreaks.com/topic/107555-solved-help-with-a-simple-get-input/#findComment-552164 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.