0
    <?php
$server_Host = '****';
$server_User = '****';
$server_Password = '****';
$server_Database = '****';

$mysqli = new mysqli ($server_Host, $server_User, $server_Password, $server_Database) or die ($mysqli->error);

$email = $mysqli->escape_string($_POST['emailPost']);
$result = $mysqli->query("SELECT * FROM Users WHERE Email='$email'");

if ($result->num_rows == 0) {
    echo ("No user was found");
}
else {
    $user = $result->fetch_assoc();
    if (password_verify($_POST['passwordPost'], $user['Password']) ) {
        if ($user['Activated'] == 1) {
            echo ("Logged in");
            echo ("|ID:" . $user['ID'] . "|Username:" . $user['Username'] . "|Email:" . $user['Email'] . "|First Name:" . $user['First_Name'] . "|Last Name:" . $user['Last_Name'] . "|System:" . $user['System'] . "|Starting Body Fat:" . $user['Starting_Body_Fat'] . "|Starting Weight:" . $user['Starting_Weight'] . "|Starting Lbm:" . $user['Starting_Lbm'] . "|Current Body Fat:" . $user['Current_Body_Fat'] . "|Current Weight:" . $user['Current_Weight'] . "|Current Lbm:" . $user['Current_Lbm'] . "|Goal:" . $user['Goal'] . "|Current Calories:" . $user['Current_Calories'] . "|Quote:" . $user['Quote'] . "|Carb Intake:" . $user['Carb_Intake'] . "|Protein Intake:" . $user['Protein_Intake'] . "|Fat Intake:" . $user['Fat_Intake'] . "|Caloric Intake:" . $user['Caloric_Intake'] . "|Premium:" . $user['Premium'] . "|Status:" . $user['Status'] . "|Activated:" . $user['Activated']);
        } else {
            echo ("This account has not been activated. If this is your account, please check your email to activate your account.")
            ;
        }
    } else {
        echo ("Incorrect password");
    }
}

This code is returning an error, I literally have spent a good hour looking through this and cannot find the error. I would really appreciate some help.

howdydoo
  • 43
  • 1
  • 1
  • 5
  • I don't see anything in your code that could throw that error. Do you have something like `$server_Host = "$config['host']";` in your redacted credentials? – jh1711 Dec 04 '17 at 20:45
  • I don't. I was able to find a backup script and I just used that instead. But it's really weird why I got that error to begin with. @jh1711 – howdydoo Dec 06 '17 at 15:25

0 Answers0