Advertisement
Guest User

Untitled

a guest
Apr 13th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2. $servername = "localhost";
  3. $username = “put_your_username”;
  4. $password = “put_your_userpassword”;
  5. $dbname = “put_your_database_name”;
  6.  
  7. // Create connection
  8. $con= mysqli_connect($servername, $username, $password,$dbname) or die ("could not connect to mysql");
  9.  
  10. // Check if you are connected to the database or not
  11. if ($conn->connect_error) {
  12. die("Connection failed: " . $conn->connect_error);
  13. }
  14. echo "Connected successfully";
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement