RE: [PHP] linking classes together

2001-03-22 Thread Stewart Taylor
inal Message- From: Tobias Talltorp [mailto:[EMAIL PROTECTED]] Sent: 21 March 2001 22:38 To: [EMAIL PROTECTED] Subject: [PHP] linking classes together I have two classes, one with mysql-connections and one with session-stuff. The session-class relies on the mysql to check if the user is re

Re: [PHP] linking classes together

2001-03-21 Thread Yasuo Ohgaki
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

[PHP] linking classes together

2001-03-21 Thread Tobias Talltorp
I have two classes, one with mysql-connections and one with session-stuff. The session-class relies on the mysql to check if the user is registered and such. What is the proper way to connect/link these classes together? I got it working if I created a $db = new mysql_connect; in the function, b