Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. <?php
  2. $host = 'localhost:3306';
  3. $user = '';
  4. $pass = '';
  5.  
  6. // Create connection
  7. $conn = mysqli_connect($host, $user, $pass);
  8.  
  9.  
  10. // Check connection
  11. if(! $conn )
  12. {
  13. die('Could not connect: ' . mysqli_error());
  14. }
  15. echo 'Connected successfully';
  16. mysqli_close($conn);
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement