Ok this is the code I have so far:
$sql = "SELECT * FROM `ads` ORDER BY RAND()";
$result = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_object($result))
{
$ads_HREF = "$row->HREF";
$ads_SRC = "$row->SRC";
$ads_ALT = "$row->ALT";
}
I am to call on this code within my forums using this:
<a href='$ads_HREF'><img src='$ads_SRC' name='$ads_ALT' border=0></a>
Here is my problem:
I have 5 ads in my database And I want all 5 to show up in a random order. Right now 5 of the same ad appears.
I think I may need to use fetch_array to do this.... But I am not sure how to do it????
Anyone know?