. */ session_start(); error_reporting(0); ini_set('display_errors', 0); //------------------------------------------------------------------------------ // Start editing below this line //------------------------------------------------------------------------------ // Database settings (should be mysql) $db_host = 'localhost'; $db_name = 'my_database'; $db_user = 'my_database_user'; $db_pass = 'my_password'; $db_port = '3306'; //------------------------------------------------------------------------------ // Don't edit below this line //------------------------------------------------------------------------------ /** * Autoload a class if it isn't loaded yet * * This function is automatically called by PHP if a class isn't loaded yet. It shouldn't be used manually. * * @param string $pClass The name of the class to load */ function __autoload($pClass) { require_once("classes/$pClass.php"); } set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)); try { $_pdo = new PDO("mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8", $db_user, $db_pass); $_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die("Down until PDO error fixed."); }