/ Published in: PHP
This will create a Navigation from a MySQL database table names. It removes the table name "includes" by default so you can see how to remove any certain tables you wish to not use as a site section. Just plug in your MySQL database details and connection info into data.php and you should be great to go.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
echo '<div class="dynamic_nav_head">Navigation</div><div class="dynamic_nav">'; // on less echo include('data.php'); if($table!='includes'){ // just one echo; // you where also using quotes and double quotes backwards echo '<div class="cat">'.$ucTable.'</div><div class="cat_item"><a href="?page=read§ion='.$table.'">View ' .$ucTable.'</a></div><div class="cat_item"><a href="?page=add§ion='.$table.'">Add New '. $ucTable .'</a></div>'; } // End If not in Includes. } // End While echo '</div>';