Your code is a wreck.
For example, you have:
while($c=mysql_fetch_array($b))
{
global $c;
?>
<?php echo $c["category-name"] ?>
<?php
}
?>
which, to start with, contains three sets of php tags when one is what should be there, surrounding all of it.
Is this even your code? If so, and you're a beginner, start by doing beginner coding.