意外的T_OBJECT_OPERATOR PHP错误

时间:2013-12-10 15:47:09

标签: php sql session

我收到了“if(!LoginODR - > EOF){错误,我在网上找不到与我正在发表的同一类声明直接相关的任何帮助。”

感谢。

if (!LoginODR -> EOF) {

$SecurityLevel = $Loginodr ->Fields('Seclevel')->Value;

$_SESSION['IsValid']="Yes";
$_SESSION['security'] = $SecurityLevel;

}else {

    $_SESSION['IsValid']="No";
    echo "<center>Invalid Username or Password!</center>";
    echo "<br><br>";
    echo "<form method='post' action='Login.php' name='formcontact' id='formcontact'>";
    echo "<center><input type='submit' name='btnback' id='btnback' value='Back' style='width: 150px; height: 50px;'></center>";

}

1 个答案:

答案 0 :(得分:0)

if (!$LoginODR->EOF) {

$SecurityLevel = $LoginODR->Fields('Seclevel')->Value;

$_SESSION['IsValid']="Yes";
$_SESSION['security'] = $SecurityLevel;

}else {

    $_SESSION['IsValid']="No";
    echo "<center>Invalid Username or Password!</center>";
    echo "<br><br>";
    echo "<form method='post' action='Login.php' name='formcontact' id='formcontact'>";
    echo "<center><input type='submit' name='btnback' id='btnback' value='Back' style='width: 150px; height: 50px;'></center>";

}