【发布时间】:2017-08-18 10:23:58
【问题描述】:
请专业的程序员在家里,这段代码有什么问题?
每当我尝试运行它时都会收到此错误。
解析错误:语法错误,意外';'在第 8 行的 C:\xampp\htdocs\a\go.php 中
php代码:
<?php
$term=$_POST['term'];
$level=$_POST['level'];
if (
$term = 'First';
$level='js1';
)
{
header("Location: result.php");
exit();
}
elseif (
$term = 'First';
$level='js2';
)
{
header("Location: result2.php");
exit();
}
else {
$error = "Entry is invalid";
}
?>
【问题讨论】:
-
Read the manual 在 IF 声明中