PDA

View Full Version : randomization thing


ClockCrew
04-23-2005, 02:31 AM
Alright...I need some help. Im absolutly stumped on this. Could someone code something that randomly picks a user from the database, and shows details about them such as, when they registered, post count, website, credits (point system), and also can place fields I custom made into this area. Id also like the user name to be clickable to view the users profile...Could someone please help? It would like something like this

Username: Clockcrew
Posts: 11
Website: (if there is no website entered in profile it will say none)
Credits aka points system:
Custom field:
Custom Field:
Custom field:

If someone could help me out, Id appreciate it.

Thanks in advance!

Could anyone...someone do this?

Tekton
04-23-2005, 03:51 AM
$the_person=$DB_site->query_first("SELECT * FROM ".TABLE_PREFIX."user ORDER BY rand() LIMIT 1");


From there, it's simply a matter of grabbing the fields you want like $the_person[username] for example~


<a href="http://location.com/member.php?u=$the_person[userid]">$the_person[username]</a>