I have a DB that contains a load of URLs, that I wish to select at random and display.
I think this script should work, but it seems to always pick the same page!
Any ideas?
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=http://www.thelangton.org.uk/openevening.php">
<?php
//-------------------------------------------------+
// Load Configuration
include './includes/config.inc.php';
include './includes/functions.php';
//-------------------------------------------------
// Initiate a MySQL connection
$database = mysql_connect("localhost", $database_user, $database_pass);
$db = mysql_select_db($database_name);
$getPage = mysql_query("SELECT * FROM `opening_evening` ORDER BY RAND() LIMIT 1");
list($url, $id) = mysql_fetch_array($getPage);
include($url);
?>
Thanks,
Ed Ludlow