PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Okay i know this question has been asked numerous times but i haven't been able to find a solution for my problem. I can store objects in session and am able to access its methods just fine but problem arises when that object has other objects of it's own.
Oh hehe i just wrote that part of the code on the fly..my real code is way too long to be posted here so i just made up some new functions to just clear my point. As for the database.inc, and it's connect function just connects to mysql database and i don't think it has any problems. The problem i am getting is that $this->db is not found when $jobInterface is derived from the session. If i were to just create it and call test() then it has no problem (it should anyways....hmm should check that out). But after i reload the page, $jobInterface is not instantiated but taken from the session and this is when $db object seems to just dissapear.....i hope i am being clear here.... -_-;
Error: "Call to a member function on a non-object "
Hmm, well i dont have enough experience with objects calling objects. So i cant help, why dont you just combine the two classes and just have it call a function instead of another object. That should work...
yeah well it's just that in my class i have more than just database object.....but for now i guess i can just merge them all into a jobInterface class. It will be huge but as of right now i have no clue how to fix it... but thnx