php - menu and submenu editable on backoffice -


i'm trying make menu submenu in php because want possible add or remove menu / submenu, i'm not able submenu part ... html of submenu in form of comment, not running code not working ...

this code:

            <?php                 require_once "conexao.php";                 $conexao = conexao_db();                 $sql = "select * menu menu_visivel '1'";                 $registo = mysqli_query($conexao, $sql);                 if(mysqli_num_rows($registo)!=0){                     while ($row = mysqli_fetch_assoc($registo)) {                         $menu_titulo = $row['menu_titulo'];                         $menu_link = $row['menu_link'];                         if ($row['menu_link']=='quinta.php') {                             $cor = "style='color: black;'";                         } else {                             $cor = "style='color: grey;'";                         }                         echo "<li><a href='".$row['menu_link']."' $cor>".$row['menu_titulo']."</a>";                         /*<ul>                             <li><a href="#">link 1</a></li>                             <li><a href="#">link 2</a></li>                             <li><a href="#">link 3</a></li>                             <li><a href="#">link 4</a></li>                             <li><a href="#">link 5</a></li>                          </ul>*/                          echo "</li>";                     }                  }             ?>            </li>        </ul>     </div> 

please me!! :d


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -