Advertisement
Guest User

Untitled

a guest
May 25th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $db_servername = "localhost";
  2. $db_username = "root";
  3. $db_password = "";
  4. $db_name = "test";
  5.  
  6. // Create connection
  7. $con = mysqli_connect($db_servername, $db_username, $db_password, $db_name);
  8.  
  9. // Check connection
  10. if (!$con) {
  11. die("Connection failed: " . mysqli_connect_error());
  12. }
  13. echo "Couldn't connect to database";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement