Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @author Brandon Long
- * @copyright 2011
- */
- class database {
- public $error;
- public $errno;
- public $query;
- private $resource;
- private $sanatize;
- public function __construct ( $host = '', $username = '', $password = '', $database = '') {
- if (!$this->resource=new mysqli(trim($host), trim($username), trim($password), trim($database))) {
- return $this->throwConnectError();
- }
- }
- private function throwConnectError () {
- die("<html><body><strong>Unabke to connect to the MySQL server.</strong></body></html>");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement