daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Aug 13th, 2016 23 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class database
  4. {
  5.    
  6.     protected $DB = null;
  7.    
  8.     function __construct()
  9.     {
  10.         $servername = "127.0.0.1";
  11.         $username = "root";
  12.         $password = "";
  13.         $dbname = "support";
  14.    
  15.         $this->DB = new mysqli($servername, $username, $password, $dbname);
  16.         if($this->DB->connect_error)
  17.         {
  18.             die("Connection failed! :( " . $connection>connect_error);
  19.         }
  20.     }
  21.    
  22.     function getConnection()
  23.     {
  24.         return $this->DB;
  25.     }
  26. }
  27.  
  28. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top