Parse error: syntax error, unexpected end of file Issue

Parse error: syntax error, unexpected end of file Issue

无论我 change/add 我的代码是什么,我都得到了 Parse error: syntax error, unexpected end of file,错误不断地告诉我我的最后一行有问题。

我的 PHP 文件应该将表单输入保存到数据库,但这个错误似乎妨碍了我,我无法弄清楚是什么原因造成的。

PHP代码

<?php

function so56917978_upload_callback() {  

    //Register variables

    $adddate = $_POST['adddate'];
    $addcontact = $_POST['addcontact'];
    $adda = $_POST['adda'];
    $addb = $_POST['addb'];
    $addincome = $_POST['addincome'];
    $addpayment = $_POST['adddate'];
    $addsubbie = $_POST['addsubbie'];
    $addcust = $POST['addcust'];

    //connect with Database

    $host_name = 'zzz.hosting-data.io';
    $database = 'zzz';
    $user_name = 'zysql_connect($host_name, $user_name, $password);

    if(!$connect) {
        die('Not Connected To Server');
    }

    //Connection to database
    if(!mysql_select_db($connect, $database)) {
        echo 'Database Not Selected';
    }
    $query = mysql_query($connect,"SELECT * FROM table WHERE adddate = '$adddate' OR addcontact = '$addcontact' OR adda= '$adda' OR addb = '$addb' OR addincome = '$addincome' OR addpayment = '$addpayment' OR addsubbie = '$addsubbie' OR addcust = '$addcust'");
    $sql = "INSERT INTO table (adddate, addcontact, adda, addb, addincome, addpayment, addsubbie, addcust) VALUES ('$adddate', '$addcontact', '$adda', '$addb', '$addincome', '$addpayment', '$addsubbie', '$addcust')";

    if (!mysql_query($connect,$sql)) {
        die('Error: ' . mysql_error($connect));
    }
    echo "1 record added";

    mysql_close($connect);
<?php

function so56917978_upload_callback() {  

    //Register variables

    $adddate = $_POST['adddate'];
    $addcontact = $_POST['addcontact'];
    $adda = $_POST['adda'];
    $addb = $_POST['addb'];
    $addincome = $_POST['addincome'];
    $addpayment = $_POST['adddate'];
    $addsubbie = $_POST['addsubbie'];
    $addcust = $POST['addcust'];

    //connect with Database

    $host_name = 'zzz.hosting-data.io';
    $database = 'zzz';
    $user_name = 'zysql_connect($host_name, $user_name, $password);

    if(!$connect) {
        die('Not Connected To Server');
    }

    //Connection to database
    if(!mysql_select_db($connect, $database)) {
        echo 'Database Not Selected';
    }
    $query = mysql_query($connect,"SELECT * FROM table WHERE adddate = '$adddate' OR addcontact = '$addcontact' OR adda= '$adda' OR addb = '$addb' OR addincome = '$addincome' OR addpayment = '$addpayment' OR addsubbie = '$addsubbie' OR addcust = '$addcust'");
    $sql = "INSERT INTO table (adddate, addcontact, adda, addb, addincome, addpayment, addsubbie, addcust) VALUES ('$adddate', '$addcontact', '$adda', '$addb', '$addincome', '$addpayment', '$addsubbie', '$addcust')";

    if (!mysql_query($connect,$sql)) {
        die('Error: ' . mysql_error($connect));
    }
    echo "1 record added";

    mysql_close($connect);
}

你忘记了结尾}