Code has been added to clipboard!
PHP Connecting to MySQL
Example
<?php
$servername = "localhost";
$username = "name_of_the_user";
$password = "users_password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error)Â
{ Â Â Â
die("Failed to connect: " . $conn->connect_error);
}
echo "Connected successfully";
?>