PHP Classes

Dynamic Menu in PHP: Display an hierarchic menu stored in a MySQL table

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (9)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 3,941 All time: 805 This week: 114Up
Version License PHP version Categories
multilevel-menu 1.0.2Freeware3HTML, Databases
Description 

Author

This class can be used to display an hierarchic menu stored in a MySQL table.

It retrieves the title and link URLs of items of a menu from a MySQL database product table.

The class generates HTML and Javascript to display the pull down menus with links according to the hierarchy of children and parent items retrieved from the database.

Picture of Pravin Sonawane
  Performance   Level  
Name: Pravin Sonawane <contact>
Classes: 4 packages by
Country: India India
Age: 44
All time rank: 50828 in India India
Week rank: 312 Up22 in India India Up

Example

<?php
   
include("functions.php");
   
$db = new PHP_fun;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PHP/MySQL/Javascript Multilevel Drop Down Menu</title>
<script language="javascript">
    function redirect(url)
    {
        window.open(url) ;
        return false;
    }
    function showId(id)
    {
        var obj = document.getElementById(id);
        obj.style.display = 'block';
        return false;
    }
    function hideId(id)
    {
        var obj = document.getElementById(id);
        obj.style.display = 'none';
        return false;
    }
</script>
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
.aerial12
{
    font-family:Verdana;
    font-size:9px;
    font-weight:bold;
    text-decoration:none;
    color:#402903;
    background-color:#FCBB2B;
    text-transform:uppercase;
}

.aerial12over
{
    font-family:Verdana;
    font-size:9px;
    font-weight:bold;
    text-decoration:none;
    color:#402903;
    background-color:#FDCB55;
    text-transform:uppercase;
}

-->
</style>

</head>
<body>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top" height="100"><?=$db->getMenu(0);?></td>
  </tr>
</table>
</body>
</html>



  Menu linkExternal page  
Screenshots  
  • menu.jpg
  Files folder image Files  
File Role Description
Image file arrow_white.gif Icon Image
Plain text file functions.php Class Class file
Plain text file menu.php Example This is actual file to run
Plain text file menu.sql Data Data base file.
Plain text file .deepsource.toml Data Auxiliary data
Plain text file LICENSE.md Lic. License text

 Version Control Unique User Downloads Download Rankings  
 100%
Total:3,941
This week:0
All time:805
This week:114Up
User Ratings User Comments (4)
 All time
Utility:71%StarStarStarStar
Consistency:71%StarStarStarStar
Documentation:-
Examples:71%StarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2649
 
This pakage not work in local machine, i make a instalation o...
8 years ago (Hugo Alves)
0%Star
i need this package
12 years ago (saeed)
52%StarStarStar
An outstanding piece of work.
14 years ago (David Quirk)
70%StarStarStarStar
This is really usefull multilevel menu.
14 years ago (Mukesh More)
70%StarStarStarStar