意外的''(T_ENCAPSED_AND_WHITESPACE),期待' - '或标识符(T_STRING)或变量(T_VARIABLE)或数字(T_NUM_STRING)in

时间:2017-12-04 20:22:30

标签: php

    <?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");
    }
}

这段代码返回一个错误,我确实花了一个小时的时间来查看这个并且找不到错误。我真的很感激一些帮助。

0 个答案:

没有答案