unexpected 'else' (T
This question already has an answer here:
The last part of your code should read as follows:
$mysqli="SELECT * FROM $tbl_name2 WHERE Emp_ID='$AdminI' and Emp_Firstname='$AdminU' and Emp_Lastname ='$AdminP'";
$result1=mysql_query($mysqli);
$count1= mysql_num_rows($result1);
$_SESSION1["login_val1"] = $count1;
if($count==1)
{
echo "login successful " . $_SESSION["login_val"];
header("location: 1home.php");
exit;
}
else
{
header("location: 1portal.php");
exit;
}
?>
An else statement should always follow immediately after an if statement. There should be no code between.
Also I noticed you are still using mysql , which is now depreceated. Use mysqli or PDO instead.
链接地址: http://www.djcxy.com/p/69234.html上一篇: PHP解析错误:语法错误,意外的T
下一篇: 意想不到的'其他'(T