I'm currently trying to make my navigation bar easier and more inline with the functions im attempting to build into my site
My old nave bar consisted of nasty dreamweaver script:
mysql_select_db($database, $bostasp_com);
$querynav = "SELECT * FROM `nav_cat`";
$nav = mysql_query($querynav, $bostasp_com) or die('We currently have some problems with our databases, try back later. <br />Thanks<br />Bostasp Administration'.mysql_error());
$row_nav = mysql_fetch_assoc($nav);
$full_row_nav = mysql_num_rows($nav);
and in the body:
<?php do { ?>
<a href="<?php echo $row_nav['url']; ?>"><?php echo $row_nav['name']; ?></a><br />
<?php } while ($row_nav = mysql_fetch_assoc($nav)); ?>
<br />
Currently im trying to shove that in a function, I have the made other functions to get this far, im just a bit stuck on how to make it turn out:
function mainnav() {
$query = db_query("SELECT * FROM `nav_cat`");
$nav = mysql_query($query) or die('We currently have some problems with our databases, try back later. <br />Thanks<br />Bostasp Administration<br />'.mysql_error());
$row_nav = mysql_fetch_assoc($nav);
$full_row_nav = mysql_num_rows($nav);
##Navigation here
}
To see what I would like this too look like go to http://www.bostasp.net/new/ for the nav bar there.
Thank you, any help would be greatly appricated.
ravingcommie