$getRandUser = $db->query("SELECT * FROM users ORDER BY RAND() LIMIT 4");
while($getUser = $db->fetch_array($getRandUser)) {
echo $getUser['username'];
}
Or if you are not using any structure what so ever you will need to replace it with the default mysql_query etc...The above script from Kaz works like a charm, but if you are using RevCMS, make sure you change $db-> with $engine->