Couple of suggestions at this point:
1. Try adding various echo("xxx"); statements throughout your code, that will help you to diagnose where the problems are
eg
PHP Code:
//Open connection to database server
echo("Connected to database<br />");
//Select database
echo("Database selected<br />");
2. Check that there are records to be displayed.
Quick note, if you enclose your php code in [P H P]xxx[/P H P] tags, just remove the spaces between the letters. This will format and colour your PHP code correctly, and make it much easier to read (like above).
Chris