Last active
December 27, 2020 13:58
-
-
Save barmgeat/ae589a8bf06c959e0d34eae94a41ab05 to your computer and use it in GitHub Desktop.
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 = "HOSTNAME"; //Cpanel hostname to MySQL is: ****localhost**** . | |
$username = "USERNAME"; | |
$password = "PASSWORD"; | |
//Create connection | |
$conn = new mysqli($servername, $username, $password); | |
// Check connection | |
if ($conn->connect_error) { | |
echo "Error connecting database: " . $conn->error; | |
die("Connection failed: " . $conn->connect_error); | |
} | |
echo "connected to the MySQL ..."; | |
$conn->close(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment