Navigation via include og mysql!
Hej,Jeg har lavet et menu til min side, som include-fil. Derfor har jeg mødt et problem. Nemlig at menuet ikke kan gøre destinations linket fed, hvordan kan man lave det, så destinations linket automatisk kan blive fed?
<?php
//connect to the database - either include a connection variable file
//or type the following lines:
$connect = mysql_connect("xxxxx", "xxxxx", "xxxxx")
or die ("Hey loser, check your server connection.");
mysql_select_db ("xxxxx");
$query_type = "SELECT * FROM menuer ORDER BY sortering";
$results = mysql_query($query_type)
or die(mysql_error());
?>
<?php
echo "<table width=\"785\" height=\"23\"><tr><td width=\"785\" height=\"23\" align=\"center\">";
$sumcount = 1;
$sum = 1;
$i="0";
$result = mysql_query("SELECT * FROM productstype");
while ($row = mysql_fetch_array($results)) {
extract($row);
echo "<font class=\"undermenu\"><a href=\"" . $menu_url . "\" class=\"undermenu\">";
echo "" . $menu_navn . "</a> </font>";
if ($sumcount == $sum) {
$sumcount = 0;
}
$sumcount++;
$i++;
}
echo "</td></tr></table>";
?>
