Added a registration system, now time to debug it

This commit is contained in:
hayden 2019-06-27 19:22:26 -05:00
parent 8d3a822965
commit a272c7d46b
1 changed files with 18 additions and 0 deletions

18
core/database.php Normal file
View File

@ -0,0 +1,18 @@
<?php
// Load in the database variables
$path = $_SERVER['DOCUMENT_ROOT'];
require($path . "/core/config.php");
// Connect to the database
$DB_CONN = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$DB_CONN) {
die('Could not connect to the database host!' . mysql_error());
}
// Select the table we are going to use to store everything
if (!(mysql_select_db(DB_NAME, $DB_CONN))) {
die('Could not connect to the database: ' . mysql_error());
}
?>