totallytech Posted February 20, 2013 Share Posted February 20, 2013 Hi, I'm trying to create a script that will redirect to a url from a form input. Basically I have a page: http://mydomain.com/page (no .html or php etc) and I have an input box on my site - I want someone to be able to type in Joe Blogs and I'm looking to simply redirect to: http://mydomain.com/page/Joe%20Blogs How can I do this? Quote Link to comment https://forums.phpfreaks.com/topic/274747-simple-url-redirect-for-form-input/ Share on other sites More sharing options...
requinix Posted February 20, 2013 Share Posted February 20, 2013 A pure HTML form can't do that. You can use Javascript to emulate a form (not actually submitting a form but clicking the button to trigger Javascript which redirects) or have the form post to a PHP script with a regular, unfriendly URL and then have that script redirect to the friendly version. Quote Link to comment https://forums.phpfreaks.com/topic/274747-simple-url-redirect-for-form-input/#findComment-1413733 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.