View Full Version : Can someone help...
Mike Gaidin
08-19-2001, 01:26 AM
Or at least point me in the right direction. I'm looking for a hack that will post the newest member to my forum on a non-vB page.
Admin
08-19-2001, 06:48 AM
Create a new PHP file, named newest.php for example, and put this in it:
<?php
require('./global.php');
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
?>
and change the path to global.php.
Now you can use SSI to include this page in your homepage. :)
Good luck!
Mike Gaidin
08-19-2001, 02:21 PM
Great!!! Thanks!! :D
*runs off to try it*
Mike Gaidin
08-19-2001, 04:06 PM
I tried it, but nothing shows up. It's just blank.
<?php
require('./global.php');
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
print "<a href='$bburl/member.php?s=$sessionhash&action=getinfo&userid=$newuserid'>$newusername</a>";
?>
Try that :)
Mike Gaidin
08-19-2001, 06:09 PM
That worked perfectly! Thanks auto! Thanks FireFly!
Admin
08-19-2001, 06:14 PM
LOL, I forgot to actually SHOW it! :D
You're welcome. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.