I am using the below code:
function get_rand_img()
{
// Make the Query
$query = "SELECT 'image_url' FROM 'images' WHERE 'active' = 'Y' ORDER BY RAND() 'limit' =1";
// Run the query
$result = @mysql_query ($query);
// If it ran okay, display records
// if ($num > 0)
// {
echo '<table width="100%" border="1" cellspacing="5" cellpadding="5">
<tr>
<td>';
while ($img = mysql_fetch_array($result))
{
echo '[img]gall/images/'.$img.'[/img]';
}
echo '</td>
</tr>
</table>';
// }
}
To try and randomly display images from a DB in an area of the page. But it only gives me errors. I have this function in a funct.inc.php file in the inc folder... does this effect anything?
You can view the active site at
Thanks for the help!
Rob
www.dilzoncharters.com