Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. include('config.php');
  3.  
  4. /*Opens connection to database with credentials*/
  5. function connectDB() {
  6.     $link = new mysqli(DB_HOST, DB_USER, DB_PWD, DB_NAME);
  7.   if ($link->connect_error) {
  8.     die("Connection failed: " . $link->connect_error);
  9.   }
  10.   /*echo "<br>Connected successfully"; */
  11.   return $link;
  12. }
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement