Answers for "Connecting to the database using mysqli"

PHP
0

Connecting to the database using mysqli

<?php

$servername = "localhost";
$username = "username";
$password = "password";
$database = "database";

// Create connection
$conn = new mysqli($servername, $username, $password, $database);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
Posted by: Guest on April-21-2022

Code answers related to "Connecting to the database using mysqli"

Browse Popular Code Answers by Language