connect.php

<?php
//Database connection details to MySQL

// Use constants for database settings
DEFINE ('DBUSER', 'Your database user');
DEFINE ('DBPASSWORD', 'Your password');
DEFINE ('DBHOST', 'localhost');
DEFINE ('DBNAME', 'Your database name');

//Make a connection to the database
$link = mysqli_connect(DBHOST, DBUSER, DBPASSWORD, DBNAME);

//Check the connection
if (!$link) {
    printf("Connection failed: %s\n", mysqli_connect_error());
    exit();
}
?>