<?php
//db credential
$servername = "localhost";
$username = "dbusername";
$password = "dbpass";
$databasename="dbname";
// Create connection
$conn = mysqli_connect($servername, $username, $password,$databasename);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}