If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Well, you need to call it for it to run. If you want it called automatically at the end of execution (which is not necessary btw wince PHP will close the connection for you) you could call it from a destructor method.

Also you are assigning the result of the connect method to a variable but the method doesn't return anything.

You might also want to consider storing the link identifier as a class property instead of passing it around as an argument to methods. Currently you could only ever call closeConnect() from within connect() since the link identifier variable only exists within the scope of that method.