authenticate("$Username","$Password","U_Username, U_Password$ }// ..."> authenticate("$Username","$Password","U_Username, U_Password$ }// ...">
 
Previous Thread
Next Thread
Print Thread
Rate Thread
#206648 11/30/2000 11:27 AM
Joined: Nov 2000
Posts: 16
User
User
Offline
Joined: Nov 2000
Posts: 16
In addpost.php , you do

if ($Reged == "y") {
$userob = new user;
$user = $userob -> authenticate("$Username","$Password","U_Username, U_Password$
}

// See if they are banned
$userob -> check_ban($Username);

What if anonymous users are allowed to post? No object define when you go to check_ban() function because $userob = new user; is in the if block.



------
Da PHP programmer

Edited by Goten on 11/30/00 10:28 AM.



------
Da PHP programmer
Sponsored Links
Joined: Sep 1999
Posts: 339
Kahuna
Kahuna
Offline
Joined: Sep 1999
Posts: 339
Then ban by IP... right?

Muhammad Chishti
Creative dIRECTOR
[:white]http://www.imcuniverse.com


Muhammad
Joined: Nov 2000
Posts: 16
User
User
Offline
Joined: Nov 2000
Posts: 16
No, I am saying if anonymous users are allowed to post, then $Reged will be equal to "n". Therefore, $userob = new user; will not be execute. If it is not executed, there is no $userob object. When the script hit the line $userob - > check_ban($Username); , a Fatal error will occur due to using a object method which the object does not exist.

------
Da PHP programmer


------
Da PHP programmer
Joined: Sep 1999
Posts: 339
Kahuna
Kahuna
Offline
Joined: Sep 1999
Posts: 339
Yes, I see, you are correct... []/w3timages/icons/smile.gif[/]

Muhammad Chishti
Creative dIRECTOR
[:white]http://www.imcuniverse.com


Muhammad
Joined: Nov 2000
Posts: 8
Newbie
Newbie
Offline
Joined: Nov 2000
Posts: 8
I replied to a post as an Anonymous user and got "Fatal error: Call to a member function on a non-object in addpost.php on line 33". Once I logged in the post was fine.

Simon Clausen


Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Working on getting these problems fixed up now.

-------------------
Scream
WWWThreads Developer


UBB.threads Developer

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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)