这是我用我的HTML文件中的代码腓如果,否则不能正常工作
<? if (empty($_POST["name"]) || empty($_POST["gender"]) || empty($_POST["dorm"]): ?>
You must provide your name, gender, and dorm! Go <a href="froshims2.php">back</a>.
<? else: ?>
You are registered! (Well, not really.)
<? endif ?>
我得到一个错误说:
Parse error: syntax error, unexpected ':' in /home/jharvard/vhosts/localhost/public/week2/register2.php on line 20
我不明白为什么这种形式,如果别的不工作
另外'' endif ?>应'' endif; ?>分号 – MackieeE
不是之前的PHP闭标签 –
由于必要的,是错误是在丢失的支架上的,如果线 – Akshay