SNIP > // This does not work --> > class sessions { > function sessions { > $db = new mysql_connect; > } > > function testprint() { > $db-> connect() > } > } This does not work as it shouldn't. You create $db in another function => other function cannot use. Make it class member variable. > function sessions { > $db = new mysql_connect; $this->db = new mysql_connect; > } > > function testprint() { > $db-> connect() $this->db->connect(); > } Regards, -- Yasuo Ohgaki > $sess = new sessions; > $sess-> testprint(); > > Any thoughts? > // Tobias > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to