I am wondering how to get the following to be a global function. I want the class function to not have to keep logging into the MySQL I am using
https://github.com/joshcam/PHP-MySQLi-Database-Class#initialization
This is what I have done so far, would that work?
<?php
require_once('system/MysqliDb.php');
$db = new MysqliDb ('host', 'username', 'password', 'databaseName');
class system{
public function __construct() {
$db;
}
}
?>