Guest User

Untitled

a guest
Oct 30th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.     // When I now do $hDB = new DBC();, it will automatically
  3.     // create a new handle to the database using my own MySQL class.
  4.  
  5.     // after that, all I need to do is $hDB->connect(); and I can start xD
  6.     class DBC extends MySQL{
  7.         const HOST = "host";
  8.         const USER = "username";
  9.         const PASS = "password";
  10.         const NAME = "database-name";
  11.         public function __construct(){parent::__construct(self::HOST,self::USER,self::PASS,self::NAME);}
  12.     }
  13. ?>
Add Comment
Please, Sign In to add comment