Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class database
- {
- protected $DB = null;
- function __construct()
- {
- $servername = "127.0.0.1";
- $username = "root";
- $password = "";
- $dbname = "support";
- $this->DB = new mysqli($servername, $username, $password, $dbname);
- if($this->DB->connect_error)
- {
- die("Connection failed! :( " . $connection>connect_error);
- }
- }
- function getConnection()
- {
- return $this->DB;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment