Re: More ???s on passing variables

From: Date: Thu, 01 Aug 2002 12:21:51 +0000
Subject: Re: More ???s on passing variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-110660@lists.php.net to get a copy of this message
Help still needed. I just went back to the code and looked. Making $ItemNum does not make a difference. And the object which is passed to it is part of the class which is global anyway. Paul Paul Dionne wrote: > Hello everyone, > > I have a class in my script which has information on specific tables such > as standard queries, tablenames, Index field... > > Then there is a function called StandardDropDown($ItemNum, $Name) which > gets the info from the appropriate table you want and displays a dropdown > menu based on the table. > > $ItemNum referrs to the table I want to output, $Name is what I want to > call the dropdown in the HTML output. > > When I call the function directly from a page it works great. > > When I call it from another function I get an error: > Fatal error: Call to a member function on a non-object in > /var/www/html/COMESA/theme/functions.inc on line 61 > > This is line 61: $TableName= $ItemNum->get_TableName(); > > As I said, I only get this error when I call from a function, not if I > call > directly from a page. I don't see why that should make any difference > though. > > Paul

« previous php.general (#110660) next »