Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @author Brandon Long
  5. * @copyright 2011
  6. */
  7.  
  8.  
  9. class database {
  10.  
  11. public $error;
  12. public $errno;
  13. public $query;
  14. private $resource;
  15. private $sanatize;
  16.  
  17. public function __construct ( $host = '', $username = '', $password = '', $database = '') {
  18.  
  19. if (!$this->resource=new mysqli(trim($host), trim($username), trim($password), trim($database))) {
  20.  
  21. return $this->throwConnectError();
  22.  
  23. }
  24.  
  25. }
  26.  
  27. private function throwConnectError () {
  28.  
  29. die("<html><body><strong>Unabke to connect to the MySQL server.</strong></body></html>");
  30.  
  31. }
  32.  
  33. }
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement