danmerrino Posted September 30, 2008 Share Posted September 30, 2008 hello helpful php experts (and i hope this is the right place to post my first post), i am working on a site on which i use htaccess files and the mod_rewrite to make the urls more search engine friendly (domain.com/examples/1 takes you to domain/examples?example=1) my question is about the submission of search and other forms. the way i am doing it right now, is by submitting for example a search query to the same page via the post method and then using redirect in a piece of code at the very top of the page with for example: if(isset($_POST['query']) header("Location: domain.com/search/$_POST[query]"); this works just fine, except for the fact that it is rather slow and cumbersome. i was wondering if anybody knows of a better way of submitting forms with these rewritten urls (without any js) any answers or helpful suggestions would be greatly appreciated ???, greetings, dan Quote Link to comment Share on other sites More sharing options...
aebstract Posted September 30, 2008 Share Posted September 30, 2008 <form action=\"/examples/1/\" method=\"post\" name=\"contact\"> I mean I don't get why that isn't right? Quote Link to comment Share on other sites More sharing options...
danmerrino Posted September 30, 2008 Author Share Posted September 30, 2008 thanks for answering finally somebody... :-\ i somehow forgot to mention that it would be important for the user to be able to copy paste the url and then get the desired results, something that would not be possible when passing the value with POST... ...help? :'( Quote Link to comment 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.