解析错误:语法错误,第83行的C:\ xampp \ htdocs \ eg \ submit.php中的文件意外结束[关闭]

<html>
<body>

<?php include("header.php"); ?>
   <?php include("menu.php"); ?>
   <?php
$host = 'localhost';
$user = 'root';
$password = '';

$database = 'egov';

$conn = mysql_connect($host,$user,$password) or die('Server Information is not Correct');
mysql_select_db($database,$conn) or die('Database Information is not correct');


$sql = "CREATE TABLE IF NOT EXISTS  'upload'(file_id INT(11) NOT NULL,fName VARCHAR(255) NOT NULL,lName VARCHAR(255) NOT NULL,Mo INT(11) NOT NULL,dese VARCHAR(255) NOT NULL,Email VARCHAR(255) NOT NULL,file_name VARCHAR(255) NOT NULL,PRIMARY KEY(file_id))ENGINE = MYISAM";


if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0)
{
$fileName = $_FILES['userfile']['name'];
$tmpName  = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];

$fp      = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);

if(!get_magic_quotes_gpc())
{
    $fileName = addslashes($fileName);
}


$da = date("dmy");
echo $da;



$fname = $_REQUEST['lastname'];
$lname = $_REQUEST['firstname'];
$pno = $_REQUEST['mbo'];
$email = $_REQUEST['email'];
$query = $_REQUEST['description'];




$sql = "INSERT INTO upload (
                    fName,
                    lName,
                    Mo,
                    dese,
                    Email                   
                )
                VALUES (
                    '$fname',
                    '$lname',
                    '$pno',
                    '$email',
                    '$query ',
                    'file_name',
                    NOW()
                )";





include'index.php';


?>
<?php include("copyrights.php"); ?> 

            </div>
    </div>
</body>
</html>

please some one help me am getting an parse error while inserting data into mysql database through my script

ive also changed its code like to:

?>

still not working... its showing the same error as unexpected ending and thanks in advance ........

查看全部
dsqbkh3630
dsqbkh3630
2013/03/27 14:29
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复