[snip]
// Get randomized!... the moderated way...

$randi = mt_rand(1, $max-1);
$q = "SELECT text FROM fortunes WHERE index = '$randi'";
$choose = mysql_query($q);
$chosen1 = mysql_fetch_array($choose);
[/snip]

Put the random statement in the query

SELECT foo FROM bar ORDER BY RAND() LIMIT 1

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to