Previous Thread
Next Thread
Print Thread
Rate Thread
#238440 02/28/2003 4:00 PM
Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Can someone help me with this stupid chunk of code... I cannot see the problem.

This is in my rchat.php for invoking RaiderSoft's chat. I am losing the IP in my Online table for people that click the chat link. In this snippet, you will see to DB queries. The first returns the current IP, the second returns NULL... I am NOT falling into the if statement in between, however.

Code
 // Require the library<br />   require ("main.inc.php");<br />   $userob = new user;<br />   $user = $userob -> authenticate("U_Title,U_Groups,U_Number");<br /><br />   $Username = $user['U_Username'];<br />   $Password = $user['U_Password'];<br />   $Usernumber = $user['U_Number'];<br />   $Groups = $user['U_Groups'];<br />   $Profile  = $user['U_Title'];<br /><br /><br />// ------------------<br />// Check for any bans<br />// BETTER BAN MOD - CB added 2/27/03<br />   $userob -> check_ban($user['U_Number'],$Cat);<br /><br /><br />// Block if Not Logged in<br /><br />	$query = "<br />		SELECT O_CurrentIP<br />		FROM {$config['tbprefix']}Online<br />		WHERE O_Uid = '$Usernumber'<br />	";<br />	$sth = $dbh -> do_query($query);<br />	list($curIP) = $dbh -> fetch_array($sth);<br /><br />	echo "CURRENT IP=$curIP";<br /><br /><br />if (!$Username) {<br />   $html = new html;<br />   $html -> not_right('You must <a href="login.php">Login</a> or <a href="newuser.php">Register a Username</a>	To use the Chatroom.',$Cat);<br />}   <br /><br />	$query = "<br />		SELECT O_CurrentIP<br />		FROM {$config['tbprefix']}Online<br />		WHERE O_Uid = '$UserNumber'<br />	";<br />	$sth = $dbh -> do_query($query);<br />	list($curIP) = $dbh -> fetch_array($sth);<br /><br />	echo "CURRENT IP=$curIP";<br /> 


Thanks!


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Sponsored Links
#238441 02/28/2003 4:06 PM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Use $Usernumber instead of $UserNumber in the second query.

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
All right, smarty pants... Thanks, BTW

So, if I am using the applet version of SigmaChat (RaiderSoft's chat client), is there some mechanism that is tossing my IP when I log in to the chat module?


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
#238443 02/28/2003 4:18 PM
Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Nevermind... found it!

I have Josh's pop-under window installed and it is blowing it away.

Thanks!


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous

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:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,156
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3075
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 30
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)