|
|
|
|
Joined: Jan 2003
Posts: 250
Member
|
|
Member
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. // 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
|
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
|
Addict
Joined: Dec 2000
Posts: 1,471 |
Use $Usernumber instead of $UserNumber in the second query. 
|
|
|
|
|
Joined: Jan 2003
Posts: 250
Member
|
|
Member
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
|
|
|
|
|
Joined: Jan 2003
Posts: 250
Member
|
|
Member
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
|
|
|
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.
|
|
Posts: 449
Joined: February 2008
|
|
|
Forums63
Topics37,583
Posts293,957
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 2167
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 30
|
|
|
|
|
|