Hello. I am using a PHP class for login purposes. The MySQL database that the login process checks for the user is defined like this:
class flexibleAccess{
var $dbName = 'mydatabase';
However, as I install the application for different people, this $dbName needs constant changes. I have decided to make a config file where I keep my database information so I would have to change there witch is more easy as this login class is "hidden" somewhere. The problem is I want to do something like this:
class flexibleAccess{
var $dbName = $_SESSION['mydatabase'];
And I get the error: "Parse error: parse error in path/access.class.php on line 43" The line 43 is the line with $dbName... Why can't I use this to dynamically get my values from the session ? And how should I use it ?
Thanks