I'm working on a script that chooses a random name out of six. Problem is it just isn't random enough. It will go to the first line in the table more than the rest. So what i did was edit the script to create a session with the id# that was assigned to the name was working better but still would pick the first line in the table more than the others. Is there something wrong with the script or RAND () LIMIT 1 just not a good answer, or is there another solution? Any input would be appriciated. Thank you. Attached is the script.
$nxtimage = $SESSION['imagemain'];
mysql_select_db($database_keystone, $keystone);
$image_line="SELECT * from main_page_image WHERE main_id != '$nxtimage' ORDER BY RAND() LIMIT 1";
$imageline = mysql_query($image_line, $keystone) or die(mysql_error());
$row_image_line = mysql_fetch_assoc($imageline);
$SESSION['imagemain'] = $row_image_line['main_id'];
session_register("imagemain");