// ~~~~~~
// CONNECTION VARIABLES
//~~~~~~~
// the hostname of your MYSQL server, typically localhost
$hostname = "hostname";
// the username to access your MYSQL database
$username = "username";
// the password to access your MYSQL database
$password = "password";
// the name of the MYSQL database
$databasename = "databasename";
// ~~~~~~
// CONNECTION
//~~~~~~~
// $Connection variable is used to hold the
// connection function, and connection string.
// the variable also contains the error handing
// on the ‘or die’ syntax
$Connection = mysql_connect($hostname,$username,$password) or die (mysql_errno() . " : " . mysql_error());
//Additionally, we select the database
// which we are going to be using.
mysql_select_db($databasename,$Connection) or die (mysql_errno() . " : " . mysql_error());
THE ABOVE IS A FILE CALLED connection.php