解析错误:语法错误,意外'{',期待'('在/home/a7237281/public_html/include/session.php第313行
这是我得到的错误,与此代码有关
//check the emails
$field = "email"; //Use field name for email
$field2 = "email2";
if(!$subemail || strlen($subemail = trim($subemail)) == 0)
{
$form->setError($field, "* Email not entered");
}
else if
{
/* Check if valid email address */
$regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*"
."@[a-z0-9-]+(\.[a-z0-9-]{1,})*"
."\.([a-z]{2,}){1}$";
if(!eregi($regex,$subemail))
{
$form->setError($field, "* Email invalid");
}
else if ($subemail !== $subemail2)
{
$form->setError($field2, "* Emails does not match");
}
$subemail = stripslashes($subemail);
}
/* Check if email is already in use */
else($database->emailTaken($subemail))
{
$form->setError($field, "* Email address already in use");
}
Run Code Online (Sandbox Code Playgroud)
它指的是{在第一个之后如果.
我用整段代码编辑了,我现在能做什么?