Can someone find whats wrong im stumped
function banner() {
$t = array();
$db = mysql_connect("localhost", "webew16", "andyandy1130");
mysql_select_db("webewebin_com",$db);
$result = mysql_query("SELECT id FROM banners WHERE status='active'",$db);
while ($id = mysql_fetch_row($result)) {
array_push($t, $id);
}
$t = implode('', $t);
srand((double)microtime()1000000);
$rand = rand(0,count($t)-1);
$rand = $t["$rand"];
$result = mysql_query("SELECT FROM banners WHERE id='$rand'",$db);
$all = mysql_fetch_row($result);
$b = $all[4];
$b = $b - 1;
if($a == "0") {
mysql_query("UPDATE banners SET Hits='$a',status='inactive' WHERE id='$all[0]'");
} else {
mysql_query("UPDATE banners SET Hits='$a' WHERE id='$all[0]'");
}
return("<a href=\"$all[1]\"><img src=\"$all[2]\" alt=\"$all[3]\" border=\"0\"></a><p align=\"center\" class=\"text\">There are currently <b>$numd</b> active members!");
}