2 Votes Vote

Use result from xhtml select function

Posted by topdog 800 days ago Questions| select option function All
Hi all,

I have been tearing my hair out over this one. What I have is a select function similar to below;

<select>
<option value="book">Book Title</option>
<option value="author">Author</option>
<option value="genre">Genre</option>
</select>

I also have a text box allowing a user to enter either a book title, author or genre depending on which selection they make, and then direct to the appropriate page when they click a search button.

What I am having problems with, is finding a way to use the select result/index in a way that would allow me to do this.

So for example, if a person selects 'Genre' from the drop down list, and then types 'horror' in the text box, when they click search, it will search my sql database for all of the books with the genre 'horror' and display the results.

Thanks in advance.
Discuss Bury


Who Voted for this Question