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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.