Reputation: 11
I have a site, e.g., http://www.example.com/
I want to add a search box for searching the addresses etc. like " south dakota " and then click on submit button, and records will be fetch from database in php (Configured mySQL with select query) coded file. I want to show my result on http://www.example.com/south-dakota/ this url. So I want to change url with textbox value and related records will display on that page.
For example you can check this site findbankrates.com
Upvotes: 0
Views: 436
Reputation: 843
You'll want to look at mod_rewrite to do that... then simply submit the form to that url.
EDIT: Linkie: URL Rewriting
Upvotes: 0
Reputation: 941
redirect the url using header( 'Location: http://www.yoursite.com/'.variableformtextbox )
Upvotes: 0
Reputation: 3558
You could set the text field in an HTML form that uses a GET action. Then use a rewrite rule in your .htaccess file that turns www.xyz.com/search.php?string=south%20dakota to www.xyz.com/south%20dakota.
Upvotes: 1