// случайные анкеты
$req = mysql_query("SELECT * FROM `users` ORDER BY RAND() DESC LIMIT 4; ");
while($arr = mysql_fetch_assoc($req)){
if(is_file('files/users/photo/' . $arr['id'] . '_small.jpg')) {
print '<a href="users/profile.php?user=' . $arr['id'] . '"><img src="files/users/photo/' . $arr['id'] . '_small.jpg" height="62" width="46" alt="' . $arr['name'] . '" /></a> ';
}else{
print '<a href="users/profile.php?user=' . $arr['id'] . '"><img src="images/nofoto.gif" height="62" width="46" alt="' . $arr['name'] . '" /></a> ';
}
}
// конец анкеттак вроде