I have been working hard on my website and the only thing left is banner rotation..I have went completely brain dead at this tho..
$sql = "SELECT * FROM tb_ads WHERE banner!=="" ORDER BY id ASC;
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$id = $row['id']
$random = rand(0, count($id)-1);
$sql = "SELECT * FROM tb_ads WHERE id=$random;
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$url=$row['url']
$banner=$row['banner']
echo "<p><a href=\"" . $url . "\"><img src=\"" . banner. "\" alt=\"Advertisement\" /></a></p>";
is what I got but i can't figure out how to select from a database where banner is not empty...I get an error about " I want it to random the ID and select one id and display the banner... if you can just give me a hint I can do it from there...for some reason I'm just having trouble with this.