Hi I have a webpage that contains an iframe.
This iframe reads a mySQL database and selects advertisements from a table, in sequence.
I need this iframe to automatically refresh after 20 seconds and every time it does, it needs to show the next advertisement, not a random one.
Can someone please show me how to set up the loop, below are my efforts so far?
Thanks in advance
$query="SELECT * FROM advertisements WHERE AdvertisementStatus='Active' ORDER BY AdvertisementID";
$result = mysql_query($query) or die("Couldn’t execute query.");
while ($row = mysql_fetch_array($result))
<img src="<?php echo $AdvertisementLink; ?>" border="0" alt="Top advertisement">
<meta http-equiv="refresh" content="20" />