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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.