im confused this is what i have so far, now the links are database driven.
<?php
include ('lib/config.php');
$link = $_GET['menu'];
$result = mysql_query("SELECT id,menu FROM wsd_nav")
or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
if ($link == $row['menu'])
{
$id = $row['id'];
}
}
$result1 = mysql_query("SELECT id FROM wsd_nav WHERE menu = '{$id['menu']}'")
or die(mysql_error());
if ($result1['id'] == '1')
{
header ("Location: http://okauchee.fearfx.com/business/");
}
?>
This box of code below creates the navigation menu.
<?php
$result = mysql_query("SELECT id,menu FROM wsd_nav")
or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo '<a href="?q=' . urlencode($row['menu']) . '">'
. htmlspecialchars($row['menu']) . "</a><br />\n";
}
?>
Now I want to know how to make this work, so when a link is clicked it goes to the corresponding page.