How do I set variables using a function that are then accessible from all other functions used? I've read a few tutorials and tried using a class, but I'm not really sure what I'm doing.
This is what I have so far:
class settings {
var $dbuser = "username";
var $dbpass = "pass";
}
function connect() {
global $dbuser;
global $dbpass;
mysql_pconnect("localhost",$dbuser,$dbpass);
}
I'm sure I'm making an obvious mistake, but I'd appreciate any help.