Hello guys, first time poster, long time reader.
I was attempting to connect to my database, using both of the following codes (in different scripts of course), and each time the page brings up the standard error that shows when their is no such script existant.
Code 1:
<?php # SQL CONNECT
ini_set('display_errors', 1); // set to zero for production version
error_reporting(E_ALL);
DEFINE ('DB_USER', 'testdatabase1');
DEFINE ('DB_PASSWORD', 'password');
DEFINE ('DB_HOST', 'host');
DEFINE ('DB_NAME', 'testdatabase1');
$dbc = @sql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
@mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error());
?>
and Code2:
<?php
$host = "experienceascension.com";
$user = "testdatabase1";
$pass = "password";
$database = "testdatabase1";
//connect to database
$connection = @mysql_connect($host, $user, $pass);
//select a database to work with
$selected = @mysql_select_db($database, $connection);
or die( "<BR><BR><B>Error: Could not establish connection");
?>
Any idea's guys?