[!--quoteo(post=386057:date=Jun 20 2006, 10:40 AM:name=Ferenc)--][div class=\'quotetop\']QUOTE(Ferenc @ Jun 20 2006, 10:40 AM) [snapback]386057[/snapback][/div][div class=\'quotemain\'][!--quotec--] Something like this would work, as long as the id's are numerical, and don't have gaps in them (1,2,5,6 will error periodicly). [code]<?php $sql = "SELECT * FROM members"; $result = mysql_query($sql)or die (mysql_error()); // get the total $total = mysql_num_rows($result) or die (mysql_error()); // get a random id from the data base.. $rand = rand(1,$total); $sql .= " WHERE q_id = '$rand'"; $rand_sql = mysql_query($sql) or die (mysql_error()); while ($output = mysql_fetch_array($rand_sql)){ echo $output['membername']."<br>"; echo $output['location']; } ?>[/code] [/quote] hah ill try that thanks m8 exelent thnaks you just one last thing how can i do it so it dose it 5 times?? selects the random id 5 times and echos all 5 results? thanks -ben