Dysan Posted February 26, 2008 Share Posted February 26, 2008 Hi, What would be the PHP code for the following HTML form? I want to enable the user to search for a particular artist by selecting the appropriate character from the A-Z links. Search the Whole site, Artists only, Song only using the keywords box within a selected year range*. *The valid years will be retrieved from the database. <form id="search" method="post" action=""> <a href="search.php?char=0..9">0..9</a> <a href="search.php?char=[">[</a> <a href="search.php?char=a">A</a> <a href="search.php?char=b">B</a> <a href="search.php?char=c">C</a> <a href="search.php?char=d">D</a> <a href="search.php?char=e">E</a> <a href="search.php?char=f">F</a> <a href="search.php?char=g">G</a> <a href="search.php?char=h">H</a> <a href="search.php?char=i">I</a> <a href="search.php?char=j">J</a> <a href="search.php?char=k">K</a> <a href="search.php?char=l">L</a> <a href="search.php?char=m">M</a> <a href="search.php?char=n">N</a> <a href="search.php?char=o">O</a> <a href="search.php?char=p">P</a> <a href="search.php?char=q">Q</a> <a href="search.php?char=r">R</a> <a href="search.php?char=s">S</a> <a href="search.php?char=t">T</a> <a href="search.php?char=u">U</a> <a href="search.php?char=v">V</a> <a href="search.php?char=w">W</a> <a href="search.php?char=x">X</a> <a href="search.php?char=y">Y</a> <a href="search.php?char=z">Z</a><br /> <input id="searchKeywords" type="text" value="Some search values" /> <select id="searchWhat"> <option selected="selected">Entire Site</option> <option>Artists Only</option> <option>Songs Only</option> </select> from <select id="fromDate"> <option selected="selected">All</option> </select> to <select id="toDate"> <option selected="selected">All</option> </select> year <input id="searchButton" type="submit" value="Submit" /> </div> </form> Link to comment https://forums.phpfreaks.com/topic/93167-database-search/ Share on other sites More sharing options...
tinker Posted February 26, 2008 Share Posted February 26, 2008 You probably need to start off simple, do a plain single term search and then start adding capabilities. If you show some php code then i'm sure someone will help develop it. Here's an example of a simple search engine... Link to comment https://forums.phpfreaks.com/topic/93167-database-search/#findComment-477350 Share on other sites More sharing options...
Dysan Posted February 26, 2008 Author Share Posted February 26, 2008 How do I search more than one column of a table? Link to comment https://forums.phpfreaks.com/topic/93167-database-search/#findComment-477501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.