xxxxxxxxxx
<?php
$user = "username";
$pass = "password";
$host = "host";
$dbdb = "database";
$conn = new mysqli($host, $user, $pass, $dbdb);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
xxxxxxxxxx
<?php
$conn = mysqli_connect("localhost","root","","basic_command");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>