fazlionline Posted March 5, 2009 Report Share Posted March 5, 2009 Hi all Is this possible with PHP to make a dropdown menu which takes its values from a database? Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted March 5, 2009 Report Share Posted March 5, 2009 Indeed it is possible. Content management systems use Databases to list links for all the Categories and the sub-categories and articles of each of those. Download a CMS to see how it is done. Various CMS's will handle them differently, so check out a couple of them. Quote Link to comment Share on other sites More sharing options...
sjhwebdesign Posted March 5, 2009 Report Share Posted March 5, 2009 <?php $getcategories = mysql_query("SELECT FROM categories ORDER BY name ASC"); ?> <?php while($categories = mysql_fetch_array( $getcategories )) { ?> <?php echo $categories['name']; ?> <?php } ?> Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.