Okay the current SQL setup I have for the registration isn't working, so I am going to do it from scratch

This commit is contained in:
hayden 2019-06-29 18:58:36 -05:00
parent 8a3fa80a70
commit 6aeb89d37e
2 changed files with 2 additions and 9 deletions

View File

@ -1,18 +1,11 @@
<?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);
$DB_CONN = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
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());
}
?>

View File

@ -43,7 +43,7 @@ session_start();
<span>
<b>profile:</b> (
<?php
if ($_SESSION['logged_in'] == 1) {
if (($_SESSION['logged_in'] ?? 0) == 1) {
// I just decided to echo everything out here since the <?php ?\> syntax was ugly
echo "<a href=\"/profile.php\">profile</a>";
echo " / ";