Database Connection in MySql with PHP

 <?php

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

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

//  Check Connection
if ($conn->connect_error) {
    die("Connection Failed : " . $conn->connect_error);
}

Comments

Popular posts from this blog

Index File in PHP