<?php 
# PHP file written by Justin Goins
# Created for http://www.oakleafwoodworking.com
# Authored on Dec 17, 2007
# Updated on 12-21-2011 to reflect the VPS server settings
# Script purpose:
# An include file containing the MySQL Database Information

DEFINE ('DB_USER', 'oakleafw');
DEFINE ('DB_PASSWORD', 'hnj3t4&n43@ndfuh76');
DEFINE ('DB_HOST', ':/tmp/mysql.sock');
DEFINE ('DB_NAME', 'ow_photos');

//Make our db connection:
if ($dbc = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)){
	//connection successful 
} else { //connection failed
	trigger_error("Could not connect to the MySQL server!\n<br />MySQL Error:" . mysql_error());
	//include our footer and halt script execution
	include ($_SERVER['DOCUMENT_ROOT'].'/php/footer.php');
	exit();
}
//Select the DB
if (mysql_select_db(DB_NAME)){
	//Selected DB successfully
} else {
	trigger_error("Could not select the MySQL database!\n<br />MySQL Error:" . mysql_error());
	//include our footer and halt script execution
    include ($_SERVER['DOCUMENT_ROOT'].'/php/footer.php');
    exit();
}


?>
