PDA

View Full Version : Random Profile Link on Non-VB page


sabret00the
02-19-2003, 08:05 PM
not sure if this is possible but if it is YAY basically i wanna be able to set up a page to that if i click the link RANDOM PROFILE i will direct me to a random profile of a forum member, is that possible? if it is, thank you very much in advance. if you know how to make it pleaseeeeeeeeeeeeeeeeeeeeeeeee help me!

sabret00the
02-20-2003, 08:57 AM
is there no help :s

mr e
05-04-2003, 05:47 AM
well after finally reading your signature, i figured i'd spend 5 minutes and do this one :D


$randname = $DB_site->query_first('SELECT username, userid FROM user ORDER BY rand() LIMIT 1');
print '<a href="./VBFOLDER/member.php?s='.$session['sessionhash'].'&action=getinfo&userid='.$randname['userid'].'">'.$randname['username'].'</a>';


have fun :D just put that wherever you want :)

Black Vivi
05-04-2003, 05:52 AM
wud be easier to do this:

$randname = $DB_site->query_first("SELECT username, userid FROM user ORDER BY rand() LIMIT 1");
$randuser = "<a href=\"./VBFOLDER/member.php?s=".$session['sessionhash']."&action=getinfo&userid=".$randname['userid']."\">".$randname['username']."</a>";

then put

echo($randuser);

where you want it to appear

and i fixed a bit of ur coding mr e

mr e
05-04-2003, 05:56 AM
:eek: my coding! what was wrong with it? also my was is only a 2 liner, but i guess if you do everything in the header or something and want to echo it farther down, i dunno...

Black Vivi
05-04-2003, 06:28 AM
u used a ";" twice at the end of the print
btw, print's old...
lol

mr e
05-04-2003, 07:18 PM
my bad i did, but why do you use double quotes, and then switch out of them to do variables? it will add loading time to your page (using double quotes AND switching out for variables)

Black Vivi
05-04-2003, 09:54 PM
i find it easier

filburt1
05-04-2003, 10:07 PM
Double-quotes has pretty much no effect on performance in my experience.

mr e
05-04-2003, 10:19 PM
oh really? i thought there was a big thread here somewhere that went into the whole single/double quote thing...oh well :)

filburt1
05-04-2003, 10:26 PM
Did they have professional programming experience at NASA with a project that was critical for keeping server load low?

sabret00the
08-07-2003, 02:57 PM
wow only saw this XD ppl ready my sig, thank you so much both of you. it's something i've wanted for ages and sure do appreciate.

* sabret00the runs along checking all links in his sig ;) :p

sabret00the
10-07-2003, 10:50 PM
this don't work :(

Logician
10-08-2003, 10:07 AM
wow you asked the hack in February, help provided in May, you thanked in August and said it is not working in October.. :D

Sweeks
04-17-2009, 01:04 PM
Anyone got a solution for this?
________
Parkinson's disease forums (http://www.health-forums.org/parkinson-s-disease/)