im trying to making a random member appear on my welcome page, but when i click on the random name it comes up as my details instead of the name im clicking on anyhow this is where ive got any help be great
<?php /* RANDY LINK by immortal */ $query = "SELECT * from members ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $rowrandy = mysql_fetch_array($result); $go = $rowrandy['username']; $id = $rowrandy['id']; echo "<a href=\"profile.php?id=$id&name=$name&username=$username&password=$password\">$go</a> " ; ?>Random Member
Started on the old forum in May 2008 · view the original in the archive · old links redirect here
this is mine i made few weeks back for my sites, jus edit accordingly
$query = "SELECT * from mems ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
$random = mysql_fetch_array($result);
$profile = $random['username'];
echo "<a href=\"profile.php?name=$profile&username=$username&session=$session\">$profile</a>
";
Want something coded email me at sales@webnwaphost.com for a prices.
this is mine i made few weeks back for my sites, jus edit accordingly
$query = "SELECT * from mems ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $random = mysql_fetch_array($result); $profile = $random['user']; echo "<a href=\"profile.php?name=$profile&username=$username&session=$session\">$profile</a> ";
ok cheers brum
no probs
Want something coded email me at sales@webnwaphost.com for a prices.