<?php
    class DefaultDatabase{

        private $host;
        private $username;
        private $password;
        private $database;

        public function __construct($hostname = "localhost",$hostusername = "root",$hostpassword = "",$hostdb = "jets")
        {
            $this->host = $hostname;
            $this->username = $hostusername;
            $this->password = $hostpassword;
            $this->database = $hostdb;
        }

        /* setters fo user defined variables */

        function setHost($server_host)
        {
            $this->host = $server_host;
        }
        function setUsername($server_user)
        {
            $this->username = $server_user;
        }
        function setPassword($server_password)
        {
            $this->password = $server_password;
        }
        function setDatabase($server_database)
        {
            $this->database = $server_database;
        }

        /* configure connection */

        function connect()
        {
            return mysqli_connect($this->host,$this->username,$this->password,$this->database);
        }
    }
?>