Random Member

Started on the old forum in May 2008 · view the original in the archive · old links redirect here

4 replies · 985 views · started 18 years ago · 1 min read

3 participants
immortalempire Developer · 219 posts #1

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&amp;name=$name&amp;username=$username&amp;password=$password\">$go</a> " ; ?>
crazybrumi Super moderator Principal · 1,064 posts #2

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.

http://flagcounter.com/more/W80q

immortalempire Developer · 219 posts #3

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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close