Romanity
16-12-2007, 02:45 PM
Two pages, database wont connect... whats the problem?
<?
/*===========================================*\
// OurHabbo Systems //
// Copyright Lewis Bradish 2007 //
// //
// Licensed Version 1.0 //
// www.ourhabbo.net - [email protected] //
\*===========================================*/
/*------------------------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*------------------------------------------------------------------------*/
$site_domain = 'ourhabbo.net';
$database_type = 'mysql';
$database_name = 'ourhabbo_demo';
$database_prefix = '';
$technical_email = '[email protected]';
$master_server_name = 'localhost';
$master_server_port = 3306;
$database_username = 'ourhabbo_demo';
$database_password = 'demo';
$admin_control = 'admincp';
$can_view_admin_log = '1';
$uneditable_users = '';
/*================================================= =======================*\
// Copyright Lewis Bradish 2007 - This notice must remain in tact //
\*================================================ ========================*/
?>
<?
/*===========================================*\
// OurHabbo Systems //
// Copyright Lewis Bradish 2007 //
// //
// Licensed Version 1.0 //
// www.ourhabbo.net - [email protected] //
\*===========================================*/
include '../includes/config.php';
include '../includes/settings.php';
function error_mail($string)
{
$error_subject = 'An error has been reported at $site_domain';
$error_message = 'An error was reported at $site_domain on the page $_SERVER[PHP_SELF]<br><br>Error: $string';
$mail = mail($technical_email, $error_subject, $error_message, "From: $site_domain <$contact_email>");
if($mail){ echo("SENT"); }
die();
}
function database_connect()
{
mysql_connect($master_server_name, $database_username, $database_password);
mysql_select_db($database_name) or die(error_mail("Cannot connect to database"));
}
database_connect();
/*================================================= =======================*\
// Copyright Lewis Bradish 2007 - This notice must remain in tact //
\*================================================ ========================*/
?>
Anyone?
<?
/*===========================================*\
// OurHabbo Systems //
// Copyright Lewis Bradish 2007 //
// //
// Licensed Version 1.0 //
// www.ourhabbo.net - [email protected] //
\*===========================================*/
/*------------------------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*------------------------------------------------------------------------*/
$site_domain = 'ourhabbo.net';
$database_type = 'mysql';
$database_name = 'ourhabbo_demo';
$database_prefix = '';
$technical_email = '[email protected]';
$master_server_name = 'localhost';
$master_server_port = 3306;
$database_username = 'ourhabbo_demo';
$database_password = 'demo';
$admin_control = 'admincp';
$can_view_admin_log = '1';
$uneditable_users = '';
/*================================================= =======================*\
// Copyright Lewis Bradish 2007 - This notice must remain in tact //
\*================================================ ========================*/
?>
<?
/*===========================================*\
// OurHabbo Systems //
// Copyright Lewis Bradish 2007 //
// //
// Licensed Version 1.0 //
// www.ourhabbo.net - [email protected] //
\*===========================================*/
include '../includes/config.php';
include '../includes/settings.php';
function error_mail($string)
{
$error_subject = 'An error has been reported at $site_domain';
$error_message = 'An error was reported at $site_domain on the page $_SERVER[PHP_SELF]<br><br>Error: $string';
$mail = mail($technical_email, $error_subject, $error_message, "From: $site_domain <$contact_email>");
if($mail){ echo("SENT"); }
die();
}
function database_connect()
{
mysql_connect($master_server_name, $database_username, $database_password);
mysql_select_db($database_name) or die(error_mail("Cannot connect to database"));
}
database_connect();
/*================================================= =======================*\
// Copyright Lewis Bradish 2007 - This notice must remain in tact //
\*================================================ ========================*/
?>
Anyone?