<?php
/**
 * Created by JetBrains PhpStorm.
 * User: jrotering
 * Date: 7/5/13
 * Time: 5:59 PM
 * To change this template use File | Settings | File Templates.
 */
## MYSQL CONNECTION #####################################
require_once(SCRIPT_DIR . '/db.php');

$link = mysql_connect($db_host, $db_user, $db_pass);
if (!$link) {
    die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db($db_name, $link);
if (!$db_selected) {
    die ('Can\'t use ' . $db_name . ': ' . mysql_error());
}
########################################################