mikebyrne Posted March 31, 2008 Share Posted March 31, 2008 Im trying to code a searchfeld for my site but Im a little confused as to how I should go about it I think the php should be as below but im a little unsure about the sql <?php include("adminconnect.php"); $tbl_name = "products"; SELECT * FROM $tbl_name WHERE ProductName= searchfield; > <select name="cat"> <option value="cd" selected="selected" >CD</option> <option value="dvd" >DVD</option> <option value="game" >GAME</option> </select> <form name="ex2" method="get" action="/searchresults.php"> <input type="text" name="searchfield" size="22" maxlength="40" id="srchdrop" /> <input type="submit" value="Search Now! »" id="gosrch" /> </td></tr> </form> [code] [/code] Link to comment https://forums.phpfreaks.com/topic/98827-help-with-coding-a-seachfield/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.