mga_ka_php Posted November 18, 2009 Share Posted November 18, 2009 in <form method="get">, when you submit it the url will look something like this http://www.mydomain.com/search.php?keywords=phpfreaks&author=phpfreaks but how do i make the url like this http://www.mydomain.com/search/keywords/phpfreaks/author/phpfreaks when i submit the form? Quote Link to comment https://forums.phpfreaks.com/topic/182067-methodget/ Share on other sites More sharing options...
cags Posted November 18, 2009 Share Posted November 18, 2009 The simple answer is you don't. If you need to do it when the form is submitted I believe you may have to submit to a script in the usual manner and have that script do a redirect, creating the new url from the $_GET[] array. You would then need to use a .htaccess file to redirect that file back to the original format (but that's in the background so the visitor doesn't see it) in order to process it. It sounds both complicated and stupid, but it's the only way I can see around it. It's getting late though, entirely possible I missed a much more obvious elegant solution. Quote Link to comment https://forums.phpfreaks.com/topic/182067-methodget/#findComment-960474 Share on other sites More sharing options...
mga_ka_php Posted November 19, 2009 Author Share Posted November 19, 2009 i see. ok thanks. that's what i've been thinking, use javascript and redirect it, i'm just looking for a more possible solution. thanks for the advice. Quote Link to comment https://forums.phpfreaks.com/topic/182067-methodget/#findComment-960510 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.