I’m currently working on a class that manages the user “authorization”, and since the users are stored on a database, i need to access it from within the class. I’ve found this Mysql class: http://github.com/JeffreyWay/PHP-MySQL-Database-Class/blob/master/MysqlDb.php
But when i have instantiated the Mysql class with the mysql login information. How can i then use the methods from the Mysql class inside the other class?
You will need to add a reference to the MySQL object in your class.
I recommend passing the MySQL object into your constructor and accessing it like this:
You can then create your instance of the object with: