Topic: Only show last registered user...

How do I do this using extern.php?
I don't want the whole stats, just last registered user.

Thanks

Re: Only show last registered user...

Do you want to use extern.php for some reason or you want just the name?

in the second case this should do.

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
$result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
$stats['last_user'] = $db->fetch_assoc($result);
echo "<a href=\"profile.php?id=<?php echo $stats['last_user']['id'] ?>\">";

3 (edited by badbussenab 2007-03-22 16:22)

Re: Only show last registered user...

Well, I know that you can fetch all of the stats like this:

<?php include("http://www.sitename.com/forum/extern.php?action=stats"); ?>

Can I do this the same way, but just with the last registered user?