aniesh82 Posted November 30, 2007 Share Posted November 30, 2007 Hello Friends, I am on the search of the DHTML menu which looks like the one in the following page: http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_114a.html This menu works well but I need to load the menu items from the database, so I can configure the menu items, sub menu items etc. Could someone help me to find a menu or any site which offers similar package? Thanks & Regards, PHP Developer, India Quote Link to comment Share on other sites More sharing options...
kratsg Posted November 30, 2007 Share Posted November 30, 2007 That one uses classes and javascript in order to categorize the menu and type of menu items.. So why not load it from the database, determine which is a menu header, and a sub-menu item and populate the page? Quote Link to comment Share on other sites More sharing options...
marcus Posted November 30, 2007 Share Posted November 30, 2007 <?php # connect to your database $sql = "SELECT * FROM `list_cats` ORDER BY id"; $res = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($res)){ echo "<div id=\"main_link\">{$row['name']}"; $sql2 = "SELECT * FROM `links` WHERE `cat`='{$row['id']}'"; $res2 = mysql_query($sql2) or die(mysql_error()); while($row2 = mysql_fetch_assoc($res2)){ echo "<div id=\"link\"><a href=\"/you/{$row2['link']}\"></div>\n"; } echo "</div>\n"; } ?> easily modifiable. Quote Link to comment Share on other sites More sharing options...
aniesh82 Posted November 30, 2007 Author Share Posted November 30, 2007 Hello kratsg && mgallforever, Thanks for your suggestions. The sample menu link which I have included in the post specify the positions statically.. Please have a look on the instruction, especially from No.7 "Define the direction of the menus, their positioning and their DIV size in this section of the script: "..... It takes lot of time to modify this to a dynamic one.. Could someone suggests any site which allows to download dynamic Vertical menu which looks similar to the menu in the page .http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_114a.html ?? I am on the search of a menu which loads the menu items from database. Thanks & Regards, PHP Developer, India 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.