Hi guys,

Ok... erm


Im building a base class for my website that is going to contain all the basic information for my site, like the header, footer, mysql connection (which is going to be in a separate class).

The mysql connection is what I'm unsure about, If I set the connection variables (ie. mysql username, password, host, etc) to private and made the actual connector ($connect = mysql_connect(xxxxx)) public, would that be secure of not? It's just that its getting a bit tedious having to make mysql connections for each class (i mean having to call my mysql class).

To put it short, I want to make a connection to my mysql server in the class "base" and for all the classes that extend the "base" class to be be able to access the connection without having to make a new one, would setting the variables to private and the connector to public be secure or not?