I'd just save this file as newest.php or something like that:
PHP Code:
<?php
error_reporting(7);
require("./global.php");
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user ORDER BY joindate DESC LIMIT 1");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
echo "<a href=member.php?s=&action=getinfo&userid=$newuserid>$newusername</a>";
?>
But anyway, your problem is that:
a) you're missing the
's in your query:
Code:
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid='$numbersmembers[max]'");
and b) where are you getting $numbersmembers[max] from? You need to use another query to get it:
PHP Code:
$numbersmembers=$DB_site->query_first('SELECT MAX(userid) AS max FROM user');
So your file should look like this:
PHP Code:
<?php
require("admin/config.php");
$dbclassname="admin/db_$dbservertype.php";
require($dbclassname);
$DB_site=new DB_Sql_vb;
$DB_site->appname="VBulletin";
$DB_site->appshortname="VBulletin (forum)";
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;
$DB_site->connect();
$numbersmembers=$DB_site->query_first('SELECT 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'];
echo "<a href=member.php?s=&action=getinfo&userid=$newuserid>$newusername</a>";
?>