זה מה שאני מנסה לעשות
יש לי קוד אבל זה מציג חלון לבן משום מה
PHP קוד:
<?php
mysql_connect("localhost","xxx_xxx","xxx");
mysql_select_db("xxx_xxx");
$show = mysql_query("SELECT id, image, alt, siteaddress, sitename FROM banners order by ID") or die(mysql_error());
$rows = mysql_num_rows($show);
$randnum = rand(1,$rows);
$i = 1;
while ($res = mysql_fetch_array($show)) {
$banner{$i} = '<a href="index.php?id=' . $res['id'] . '" target="_blank"><img src="' . $res['image'] . '"
alt="' . $res['alt'] . '" border="0" /></a>';
$i++;
}
$showbanner = $banner{$randnum};
?>