sebthib55 Posted September 5, 2007 Share Posted September 5, 2007 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 More sharing options...
pocobueno1388 Posted September 5, 2007 Share Posted September 5, 2007 You would have to use JavaScript to do this, not PHP. Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341774 Share on other sites More sharing options...
sebthib55 Posted September 5, 2007 Author Share Posted September 5, 2007 I figured that I had to do Javascript and thats also what I googled and couldn't find a thing... Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341776 Share on other sites More sharing options...
teng84 Posted September 5, 2007 Share Posted September 5, 2007 thats ajax thing search for php ajax Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341777 Share on other sites More sharing options...
sebthib55 Posted September 5, 2007 Author Share Posted September 5, 2007 I will try that... I hope it works as I am not too familiar with Ajax... Thanks... Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341778 Share on other sites More sharing options...
sebthib55 Posted September 5, 2007 Author Share Posted September 5, 2007 I cannot seem to find the solution... Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341797 Share on other sites More sharing options...
cmgmyr Posted September 5, 2007 Share Posted September 5, 2007 do a search for "chained selects" you will find tons Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341799 Share on other sites More sharing options...
sebthib55 Posted September 5, 2007 Author Share Posted September 5, 2007 OOoo that might be exactly what I need... I guess its the important thing when searching is the "keywords" Thanks! Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341800 Share on other sites More sharing options...
sebthib55 Posted September 5, 2007 Author Share Posted September 5, 2007 I feel really dumb right now as I cannot figure this out... I look at my code and I cannot seem to figure out how they go with the code I made.... Link to comment https://forums.phpfreaks.com/topic/67982-drop-down-menu-help/#findComment-341810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.