<?php
//This script connects to the database

//Server information
$server = "servername"; //e.g. localhost:8889
$user = "username";
$pass = "password";

//Initiate connection
$conn = mysqli_connect($server, $user, $pass);
if (!$conn){
	die("Connection to server failed: ".mysqli_connect_error());
}
echo "Connected to server";

//Connect to database
$db = mysql_select_db($conn, "database name");
if (!$db){
	die("Database failed: ".mysqli_connect_error());
}
echo "Connected to DB";
?>