'1') { while($afull = mysql_fetch_array($rfull)) { $fullBannerID[] = $afull[BannerID]; } srand ((float) microtime() * 10000000); $fullID = array_rand($fullBannerID); $FullBID = $fullBannerID[$fullID]; //get the selected banner $qfull1 = "select * from dd_banners where BannerID = '$FullBID' "; $rfull1 = mysql_query($qfull1) or die(mysql_error()); $afull1 = mysql_fetch_array($rfull1); $FullBanner = ""; } elseif(mysql_num_rows($rfull) == '1') { $afull = mysql_fetch_array($rfull); $FullBanner = ""; } //get the ButtonBanner (left side) $qbb = "select * from dd_banners where BannerType = '150x61' "; $rbb = mysql_query($qbb) or die(mysql_error()); if(mysql_num_rows($rbb) > '1') { while($abb = mysql_fetch_array($rbb)) { $bBannerID[] = $abb[BannerID]; } srand ((float) microtime() * 10000000); $bID = array_rand($bBannerID); $ButtonID = $bBannerID[$bID]; //get the selected banner $qbb1 = "select * from dd_banners where BannerID = '$ButtonID' "; $rbb1 = mysql_query($qbb1) or die(mysql_error()); $abb1 = mysql_fetch_array($rbb1); $ButtonBanner = ""; } elseif(mysql_num_rows($rbb) == '1') { $abb = mysql_fetch_array($rbb); $ButtonBanner = ""; } ?>