I am trying to grab all of the items from the table and display them as a menu. Here is my snippet:
PHP 5 + MySQL 5 + Dreamweaver are what I am using.
<?php
$mysql_link = mysql_connect($db_hostname,$db_username,$db_password) or die("Failed to connect to MySQL");
mysql_select_db($db_database);
$query = "SELECT ".$db_nav_title.", ".$db_nav_link." FROM ".$db_table_nav." ORDER BY ".$db_nav_title;
$r_query = mysql_query($query);
while ($row = mysql_fetch_array($r_query)) {
?>
<div id="menu">
<ul>
<li><a href="./<?=$row[$db_nav_link]?>"><?=$row[$db_nav_title]?></a></li>
</ul>
</div>
<?php
}
?>
What am I doing wrong?? This exact script works in my admin section when I get all the users in the database.
See it in action here (its the nav at the top where Forum is listed, and nothing else)
ok im an idiot im sorry this is resolved by my own means... lol dont include the div in there or else it rewrites all the way down the page!!!