Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Probably beause the code has a bug in it.

// show last username
if ($config['showreg']) {
$sth = $dbh->do_query("select U_Username from w3t_Users order by U_Number DESC limit 1");
list($lastUser) = $dbh -> fetch_array($sth);
$lastUserText = "Welcome to our newest member: $lastUser<BR>";
$dbh -> finish_sth($sth);
}


Should do the trick... But I didn't test it out. That's cause fetch_array() returns an array. And when you try to print out an array and not a member in the array PHP is smart and prints "array" to help you debug..

If that code up there doesn't work then this should.

// show last username
if ($config['showreg']) {
$sth = $dbh->do_query("select U_Username from w3t_Users order by U_Number DESC limit 1");
$lastUser = $dbh -> fetch_array($sth);
$lastUserText = "Welcome to our newest member: $lastUser[0]<BR>";
$dbh -> finish_sth($sth);
}


If not then I use the excuse that I didn't really take a close look at it and I'm sleep deprived. And that I'm assuming that fetch_array() returns an array based on the fact that it printed the word "array".

Doug
http://www.netherworldrpg.net

Sponsored Links
Entire Thread
Subject Posted By Posted
Any hack for: "Welcome to our new user... santana 04/09/2001 10:43 AM
Re: Any hack for: "Welcome to our new user... The Team 04/09/2001 11:41 PM
Re: Any hack for: "Welcome to our new user... santana 04/10/2001 5:59 AM
Re: Any hack for: "Welcome to our new user... The Team 04/10/2001 7:26 AM
Re: Any hack for: "Welcome to our new user... santana 04/10/2001 10:47 AM
Re: Any hack for: "Welcome to our new user... Brewskie 04/11/2001 1:04 AM
Re: Any hack for: "Welcome to our new user... caymuc 04/11/2001 5:55 PM
Re: Any hack for: "Welcome to our new user... The Team 04/11/2001 7:04 PM
Re: Any hack for: "Welcome to our new user... The Team 04/11/2001 7:05 PM
Re: Any hack for: "Welcome to our new user... Brewskie 04/11/2001 7:24 PM
Re: Any hack for: "Welcome to our new user... caymuc 04/11/2001 7:24 PM
here is the exact code for all of us newbies! amity 07/20/2001 6:10 AM
Re: here is the exact code for all of us newbies! MrFrog 07/21/2001 5:51 PM
glad it works for you! of course you need to amity 07/22/2001 4:48 AM
Re: glad it works for you! of course you need to MrFrog 07/22/2001 6:29 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online 961
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 0
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)