语法错误,意外的T

你能看到任何我会得到意想不到的T_ELSE错误的原因吗? 我必须失明..

<?php
//Check if form was submitted
if(isset($_POST['submit']))
{   
    //Form was submitted.
    if($_POST['paypalemail'] != '');
    {
        //An email was submitted.
    } 
    else
        {
            //There was nothing in the field. Tell them.
            echo "<script language="javascript">alert('The field was left empty. Please insert your PayPal email address and try again.');</script>";
        }
} 
?>

你有一个 ; 之后如果。 只要删除它,你会没事的;;)

if($_POST['paypalemail'] != ''); //<-- Remove this ;

你在if的结尾处有一个分号

if($_POST['paypalemail'] != ''); <---

请改变脚本

if($_POST['paypalemail'] != '');
{
     //An email was submitted.
}

if($_POST['paypalemail'] != '') 
{
    //An email was submitted.
}

您在if循环的末尾输入了分号。 请删除它。

链接地址: http://www.djcxy.com/p/12017.html

上一篇: syntax error, unexpected T

下一篇: PHP Parse error: syntax error, unexpected T