解析錯誤:語法錯誤,意外「{」,希望「(」的行313意外{預期(
/home/a7237281/public_html/include/session.php這是我的錯誤,與此代碼
//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");
}
而其指的是{
http://php.net/if <---閱讀本;-) – zerkms 2010-05-01 10:39:08