提交表单时,文件名的输入和描述在数据库中始终为空白,但是文件的输入已成功添加:
<form action="connect.php" method="post" enctype="multipart/form-data">
File name:<br />
<input type="text" name="filename" /><br/><br/>
Description:<br />
<input type="text" name="description" />
<br /><br />
<input type="file" id="files" name="file" />
if(isset($_POST['submit']))
{
$blobObj->insertBlob($_FILES['file']['tmp_name'],"application/pdf");
$name = $_POST['filename'];
$description = $_POST['description'];
if($name !=''||$description !=''){
$sql1 = "INSERT INTO files (filename, description) VALUES
('$name','$description')";
include('disp_quiz.html');
}
else{
echo "<script> alert ('Some Fields are Blank') </script>";
}
}