Advertisement
callmewhateverUwant

connectDB mysqli

May 29th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2. #connect to DB
  3. $db = new mysqli('localhost', 'username', 'password', 'database name');
  4.  
  5. if($db->connect_errno > 0){
  6.     die('Unable to connect to database [' . $db->connect_error . ']');
  7. }
  8. else{
  9.     echo "this is work or what bitch";
  10. }
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement