Created
March 19, 2018 17:47
-
-
Save antoinefortin/73b3a6410242251f5d937a18802b5a5c to your computer and use it in GitHub Desktop.
[Connect to DB in Php]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servername = "127.0.0.1"; | |
$username = "root"; | |
$password = ""; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password); | |
// Check connection | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
echo "Connected successfully"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment