Advertisement
Guest User

Untitled

a guest
Feb 5th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. class DB {
  2.     //Database connection
  3.     public static $conn;
  4.  
  5.     /**
  6.      * Connect to the database
  7.      *
  8.      * @return bool false on failure
  9.      */
  10.  
  11.     public function connect() {
  12.         //Try and connect to the database
  13.         $host = 'helios.csesalford.com';
  14.         $user = 'stc885';
  15.         $pass = 'iv9bBshl2';
  16.         $db = 'stc885';
  17.         $conn = new mysqli($host,$user,$pass,$db);
  18.         return $conn;
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement