Просмотр поста

.
dhruva

hello friends i would like to ask how to make random profile picture of online users , if you are ,male then it will show online females and if you are female online males like this

if ($user_id) {
$onltime = $realtime - 300;
$q = @mysql_query("select * from `users` where lastdate>='" . intval($onltime) . "' ORDER BY RAND() LIMIT 1 ;");
$arr = mysql_fetch_array($q);
//echo '<a href="../files/photo/' . $arr['id'] . '.jpg"><img src="../files/photo/' . $arr['id'] . '_small.jpg" alt="' . $arr['name'] . '" border="0" /></a>';
echo '<div class="rmenu"><img src="../files/avatar/' . $arr['id'] . '.png" width="32" height="32" alt="' . $arr['name'] . '" /><br />';
echo '<a href="../str/anketa.php?id=' . $arr['id'] . '">flirt</a> <b>' . $arr['name'] . ' </b> wants to find <b>' . $arr['sex1'] . '</b> looking for ' . $arr['relation'] . '</div>';


in this script its shows random al online members name, and avatar
but i want conditions if you are male then it will show random online female and if you are female then random online male users