
March 5th, 2013, 12:58 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 2
Time spent in forums: 20 m 36 sec
Reputation Power: 0
|
|
|
Search for a keyword in a database
I simply want to create a search box, enter a keyword in it, search the database for this keyword and load the corresponding subpage. Here is an example of what I am trying to accomplish. Let's say I have travel website with two sub-pages for New York and San Francisco ( newyork.travel.com and sanfrancisco.travel.com ). My database has two raws with the names of my sub-pages. Now when I enter Ney York in the search box I want to search the database and if there is a match then newyork.travel.com should be opened in the browser.
Can you please advise me how to do it? I know how to create a search box and a database, I also know how to create a sql query. What I don't know is how to load a page when a match is found in my database. What function or method should I use.
|