Unless they're later in the script, in a part you didn't include here, your brackets aren't all in pairs. That could be a problem.
PHP Code:
<? // you should use full tags: <?php
include_once "accesscontrol.php";
$sb = "select * from job_banners_t";
$rsb = mysql_query($sb) or die(mysql_error());
if(mysql_num_rows($rsb) > '0')
{ // <-- this one has no closing bracket
echo "<table align=center width=600><caption align=center><b>Photo Album </b></caption><tr><br><td colspan=2><hr width=100% height=1px color=#000099></td></tr>";
while ($ab = mysql_fetch_assoc($rsb)) {
$myimgs[] = $row['fn'];
{ // <-- this one has no closing bracket
echo '<table><tr>';
for($x=0;$x<count($myimgs);$x++) {
if ($x%3==0) { echo '</tr>'; }
echo '<td><img src=\"http://$_SERVER[HTTP_HOST]$dir/photo_album/$ab[fn]\" width=\"120\" height=\"100\" /></td>';
}
echo '</tr></table>';
?>
Something else: All the code here is dependent on getting a result from your database query ( if(mysql_num_rows($rsb) > '0') ). Do you know that there is a result? Add this right after the $rsb = mysql_query($sb) or die(mysql_error()); line:
PHP Code:
if(mysql_num_rows($rsb) == 0){ echo 'no results to show'; }
Bookmarks