Unholy Prayer Posted February 7, 2007 Share Posted February 7, 2007 Ok, I'm making a tutorial database system and i'm trying to make an add tutorial script. My database has a table for programs(PhotoShop, GIMP, etc) and then a table for the programs' subcategories(Signatures, webgraphics, patterns, etc). How would I make the select options change based on the program the user has selected? For example, if a user selects PhotoShop, it should only display the categories for that table. How would I do this? Quote Link to comment https://forums.phpfreaks.com/topic/37534-questionto-long-to-put-in-topic-subject/ Share on other sites More sharing options...
papaface Posted February 7, 2007 Share Posted February 7, 2007 Well you could do something simple by getting the category selected and work it into your sql. e.g. <?php $cat = $_GET['cat']; $sql = mysql_query("select * from table where cat='$cat'"); ?> sample url: index.php?cat=photoshop Quote Link to comment https://forums.phpfreaks.com/topic/37534-questionto-long-to-put-in-topic-subject/#findComment-179440 Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 If you mean you want the contents of the drop down to repopulate each time the user picks a program, you'll need to use Ajax. Quote Link to comment https://forums.phpfreaks.com/topic/37534-questionto-long-to-put-in-topic-subject/#findComment-179471 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.