Jump to content

Recommended Posts

I made a drop down menu in a search feature. The search feature works great, except I wanted to add an extra feature to it...

 

What I want is if a user selects GAME in the drop down, I wish to make a new drop down menu appear displaying categories... How can I do this? I've googled, but received no answer.

 

 

 

<?PHP


echo"<form action='' method='get'>
Term: <input type='text' value='' name='search' /> <br /><br />
Search by: <br /><select size='1' name='by'>
<option value='game'>Game</option>
<option  value='item'>Item</option>
<option value='name'>User</option>
<option  value='usershop'>Usershop</option></select>";


//If User Selects GAME display Categories below
echo"<br />In Category: <select size='1' name='searchcat'>
<option value='All' selected='selected'>All</option>";
$catquery=run_query("SELECT * FROM phpqa_cats");
while ($catlist= mysql_fetch_array($catquery)) echo  "<option value='$catlist[0]'>$catlist[1]</option>";
//End Display Categories
?>

</select><br /><br />
<input type='submit' value='search' name='action' />
<br /><br />
</form>

Link to comment
https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/
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.