Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. $host = "localhost"; //database location
  3. $user = "root"; //database username
  4. $pass = ''; //database password
  5. $db_name = "mydb"; //database name
  6.  
  7. //Database Connection
  8. $conn = mysqli_connect($host, $user, $pass);
  9. mysqli_select_db($conn,$db_name);
  10. //Check Msg
  11. if (!$conn) {
  12. die('Connection failed: ' . mysqli_error());
  13. }
  14. //echo "Connected successfully";
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement