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
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
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
3 matches
Mail list logo