CodeIgniter Forums
Can Someone help me with this PHP error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Can Someone help me with this PHP error (/thread-19427.html)



Can Someone help me with this PHP error - El Forum - 06-07-2009

[eluser]Ben Lester[/eluser]
when i am trying to delete a forum post it come up with this error message
Fatal error: Call to a member function query() on a non-object in /home/blitzcit/public_html/forums.php on line 607

I attached a file of the forum.php kindly help me what is wrong in this script

Thanks in advance..


Can Someone help me with this PHP error - El Forum - 06-07-2009

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

Line 607 is a "{", so that can't be the problem. On line 602 you make a query, and the $db variable doesn't exist, which is why you're getting the error. If this really is a CodeIgniter app, you shouldn't need to import globals at all.


Can Someone help me with this PHP error - El Forum - 06-07-2009

[eluser]Ben Lester[/eluser]
So what line should I delete?


Can Someone help me with this PHP error - El Forum - 06-07-2009

[eluser]TheFuzzy0ne[/eluser]
Who said anything about deleting anything? I have no idea what your current setup is, so I can't really comment on changes to make.