Welcome to Geeklog, Anonymous Saturday, June 21 2025 @ 12:40 pm EDT
Geeklog Forums
New users
Can someone please tell me how can I make a simple PHP script that displays the users that registered today.
Is there anything like this already available?
Thanks.
Is there anything like this already available?
Thanks.

10
10
Quote
Thanks for that.
I still have no clue how to do it.
I was trying this code:
("SELECT COUNT(*) FROM gl_users WHERE regdate='".date("M d, Y")."'");
How can I compare the current date with the date (and time) Geeklog uses when users register?
Thanks.
I still have no clue how to do it.
I was trying this code:
Text Formatted Code
$result = mysql_query("SELECT COUNT(*) FROM gl_users WHERE regdate='".date("M d, Y")."'");
How can I compare the current date with the date (and time) Geeklog uses when users register?
Thanks.

7
13
Quote
This looks great. I would like to use it. Anyone has done this yet?
9
5
Quote
Anyone please?
I still didn't manage to get it to work?
I still didn't manage to get it to work?

6
14
Quote
Status: Banned
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
this works for me... a variation of phpblock_whos_new for your lib-custom.php
// NOTE: just a slight variation of ***function phpblock_whos_new()***
// this returns users (up to limit) that have registered today.
*/
function phpblock_whos_new_today(){
global $_CONF, $_TABLES;
$today = date("Y-m-d") . ' 00:00:00';
$numToShow = 5;
$result = DB_query("SELECT uid,username,photo FROM {$_TABLES['users']} WHERE regdate > '$today' ORDER BY regdate DESC limit $numToShow");
$nrows = DB_numRows($result);
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=';
$retval .= $A['uid'] . '">' . $A['username'] . '</a>';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'];
$retval .= '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="';
$retval .= $_CONF['layout_url'] . '/images/smallcamera.gif" border="0"></a>';
}
$retval .= '';
}
return $retval;
}
Text Formatted Code
/*// NOTE: just a slight variation of ***function phpblock_whos_new()***
// this returns users (up to limit) that have registered today.
*/
function phpblock_whos_new_today(){
global $_CONF, $_TABLES;
$today = date("Y-m-d") . ' 00:00:00';
$numToShow = 5;
$result = DB_query("SELECT uid,username,photo FROM {$_TABLES['users']} WHERE regdate > '$today' ORDER BY regdate DESC limit $numToShow");
$nrows = DB_numRows($result);
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=';
$retval .= $A['uid'] . '">' . $A['username'] . '</a>';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'];
$retval .= '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="';
$retval .= $_CONF['layout_url'] . '/images/smallcamera.gif" border="0"></a>';
}
$retval .= '';
}
return $retval;
}
7
11
Quote
All times are EDT. The time is now 12:40 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content