如何删除解析错误:语法错误,意外的'else'(T_ELSE),期望第10行的C:\ xampp \\\\\ = [英] How to remove parse error: syntax error, unexpected 'else' (T_ELSE), expecting end of file in C:\xampp\htdocs\ma.php on line 10
本文介绍了如何删除解析错误:语法错误,意外的'else'(T_ELSE),期望第10行的C:\ xampp \\\\\ =的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?php
$emailErr = " ";
$email = " ";
$errors = 0;
if ($_SERVER ["REQUEST_METHOD"] == "POST")
{
if (empty($_POST ["email"]))
{
$emailErr = "Email is required";
$errors = 1;
}
else
{
$email = test_input ($_POST ["email"]);
if (!filter_var ($email , FILTER_VALIDATE_EMAIL))
{
$emailErr = "invalid format";
$errors = 1;
}
}
}
?>
<title> my website
<center>
<embed src="BTS.MP3" autostart="true" hidden="true">
<a href="abc.com"></a><br>
<h1 align=" center "> Login </h1><br>
">
<font color="white">
EMAIL ID
<span class="error">*<?php echo $emailErr;?></span><br>
<br>
PASSWORD<br>
<br>
<br>
<br>
<?php
if ( isset ( $_POST [ 'submit' ] ) && ( $errors == 0) )
{
echo "<a href="abc.com">Home </a>"
}
?>
<a href="resendpass.html" target="_blank">Forgot password..CLICK HERE </a>
</font>
<font color="red">
NOT REGISTERED YET ?? <a href="http://localhostma1.php" target="_blank">SignUp </a>
</font>
<br>
<br>
<br>
<br>
<br>
<hr size="2" color="black" noshade="">
<font size="1"> Copyright © 2018 abc Private Limited, India. All rights reserved </font><br>
<a href="https://www.youtube.com" target="_blank"></a>
<a href="https://www.blogger.com" target="_blank"></a>
</center>
我的尝试: < br $>
i已尝试删除else并删除分号之间的空格
What I have tried:
i have tried removing the else and removing spaces between semicolons
推荐答案
emailErr = ;
emailErr = " ";
email = ;
email = " ";
errors = 0 ;
if (
errors = 0; if (
这篇关于如何删除解析错误:语法错误,意外的'else'(T_ELSE),期望第10行的C:\ xampp \\\\\ =的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文