Created
March 28, 2025 07:35
-
-
Save yesenvidnath/785da42385f67c746d237ba5e3f5f621 to your computer and use it in GitHub Desktop.
Basic PhP Connection
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 = "localhost"; | |
$username = "root"; | |
$password = "1234"; // Optional for the users | |
$database = "geoffryx_db"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $database); | |
// 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