ok this is probably very simple but I cant figure out how to do it.
$query2 = "select * from links, linkscat where linked = 1 and category ='".$_GET['cat']."' and category = linkscat.id";
$result2 = mysql_query($query2);
echo $catname;
while ($row2 = mysql_fetch_assoc($result2)) { ?>
<?=$row2['description']?></div><?
$catname = $row2['name']; }
?>
I am getting catname undefined variable error.
Due to the visual layout the variable must be above the while statement.... Is there anyway to initialize it beforehand or do something to get it to display...
$query2 = "select * from links, linkscat where linked = 1 and category ='".$_GET['cat']."' and category = linkscat.id";
$result2 = mysql_query($query2);
echo $catname;
while ($row2 = mysql_fetch_assoc($result2)) { ?>
<?=$row2['description']?></div><?
$catname = $row2['name']; }
?>
I am getting catname undefined variable error.
Due to the visual layout the variable must be above the while statement.... Is there anyway to initialize it beforehand or do something to get it to display...