Jump to content

Search Function


june_c21

Recommended Posts

hi, i just want to find out how to write the search function. My database table content gf,package, title.  Example, when user click on 'GF1'from the drop down menu then it will automatically list the only GF1 available 'package' . then user choose the 'package' and type the keyword (title). PLease help. Appriciate that... Thanks a lot

 

<form name="form1" method="post" action="search.php">
 <select name="gf" id="gf">
   <option value="GF1">GF1</option>
   <option value="GF2">GF2</option>
   <option value="GF3">GF3</option>
 </select>
 <select name="package" id="package">
   <option value="Pack 1">Pack 1</option>
   <option value="Pack 2">Pack 2</option>
 </select>
 <input name="gf" type="text" id="gf">
 <input type="submit" name="Submit" value="Search">
</form> 

Link to comment
https://forums.phpfreaks.com/topic/90884-search-function/
Share on other sites

You have 2 html fields named the same, this will cause issues.

 

<select name="gf" id="gf">

 

and

 

<input name="gf" type="text" id="gf">

 

Also, help us to help you, don't expect us to do ALL the legwork. How about you write out what you "think" the php should look like and do and then we'll push you in the right direction.

Link to comment
https://forums.phpfreaks.com/topic/90884-search-function/#findComment-465771
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.