When I try to include the navigation part in my webpage, the content part is not displayed. both parts are getting data from mySQL, can anyone please tell me what is wrong with this navigation code and is it secure....
<?
// Category Information
$tbc = @mysql_query("SELECT title FROM nav WHERE category = $cat AND sub = 0 AND var = 0");
$tbcRow = mysql_fetch_array($tbc);
$cat_top = strtolower($tbcRow['title']);
?>
<table width="186" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td width="166" height="20"><? echo("<a href='content.php?id=".$cat."' class='title1'>".$cat_top."</a>"); ?></td>
</tr>
<?
// While Loop for Sub Section Information
$tcc = @mysql_query("SELECT * FROM nav WHERE category='$cat' AND sub>'0' AND var='0'");
while($tccRow= mysql_fetch_array($tcc)){
// Extract variables for navigatoin links
extract($tccRow);
$myrecords = array(
// Required varaibles to display
stitle=>$tccRow['title'],
scat=>$tccRow['category'],
ssub=>$tccRow['sub'],
svar=>$tccRow['var']
);
// Make table cells
echo ("<tr>");
echo ("<td width='20px'></td><td width='166' height='20'><a href='content.php?id=".$myrecords[scat].".".$myrecords[ssub]."' class='title2'>".$myrecords[stitle]."</a></td>");
echo ("</tr>");
// While Loop for Var Section Information
$tdc = @mysql_query("SELECT * FROM nav WHERE category = $cat AND sub = $myrecords[ssub] AND var > 0");
while($tdcRow= mysql_fetch_array($tdc)){
// Extract variables for navigatoin links
extract($tdcRow);
$myrecords2 = array(
// Required varaibles to display
stitle=>$tdcRow['title'],
scat=>$tdcRow['category'],
ssub=>$tdcRow['sub'],
svar=>$tdcRow['var']
);
// Make table cells
echo ("<tr>");
echo ("<td width='20px'></td><td width='166' height='20'><a href='content.php?id=$myrecords2[scat].$myrecords2[ssub].$myrecords2[svar]' class='title3'>$myrecords2[stitle]</a></td>");
echo ("</tr>");
}
}
?>
</table>