Hello, Im building a object oriented webapplication with PHP. I know PHP doesnt fully support OOP. I made a class called Database. This class contains several variables. One of these vars is the username and the password for the database. When i create a Database object I want to register it in the applications session, so it available through the whole app. Is this secure? is it possible to view this variable from the outside? To make it more secure i tried 'crypt()'. But this doesnt work in this way:
class Database{ var $server="db.provider.com"; var $username="myusername"; var $password=crypt("8d3j22d"); var $database="webshop"; } it results in: Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php