解析错误:语法错误,意外'$ LoginRS__query'(T_VARIABLE)

时间:2018-06-18 23:09:03

标签: php

当我尝试使用允许可以访问我网站的人的功能时,出现了语法错误。它显示了

  

解析错误:语法错误,意外'$ LoginRS__query'(T_VARIABLE)

然而,我无法弄清楚,所以请帮助我。谢谢你的帮助。

<?php
if (!isset($_SESSION)) {
    session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['id'])) {
    $loginUsername           = $_POST['id'];
    $password                = $_POST['password'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "index.php";
    $MM_redirectLoginFailed  = "fail.php";
    $MM_redirecttoReferrer   = false;
    mysql_select_db($database_conn, $conn);

    $LoginRS__query = sprintf("SELECT yzw_08stuffid, yzw_08password 
                               FROM yzw_08login 
                               WHERE yzw_08stuffid='%s' 
                               AND yzw_08password='%s'", 
                            get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), 
                            get_magic_quotes_gpc() ? $password : addslashes($password))
                            ;

    $LoginRS = mysql_query($LoginRS__query, $conn) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
        $loginStrGroup = "";

        $_SESSION['MM_Username']  = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;

        if (isset($_SESSION['PrevUrl']) && false) {
            $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        }
        header("Location: " . $MM_redirectLoginSuccess);
    } else {
        header("Location: " . $MM_redirectLoginFailed);
    }
}
?>

0 个答案:

没有答案