这是我的表格
<form method="POST" action="includes/add.php" dir="rtl" enctype="multipart/form-data">
<br>
حدد القسم : <select name="section">
<?php
$query = "SELECT * FROM `sections`";
$result = mysql_query($query);
while($row=mysql_fetch_array($result, MYSQL_ASSOC)){
echo "<option value='".$row['id']."'>".$row['sectionName']."</option>";
}
?>
</select><br>
عنوان الموضوع :<input type="text" name="title" class="mem-information"/><br>
الموضوع : <br /><textarea name="subject" rows="10" cols="50" class="mem-information" style="width: 500px"></textarea><br /><br>
الصورة :<input type="file" name="image"><br>
<input type="submit" value="إرسال" name="send" class="log" style="color: black">
</form>
我的 add.php (将表单的内容添加到数据库)是
<?php
session_start();
include('../../includes/connect.php');
$sectionID = $POST["section"];
$title = $_POST['title'];
$subject = $_POST['subject'];
$visiable = 1;
$imageName = mysql_real_escape_string($_FILES["image"]["name"]);
$imageData = mysql_real_escape_string(file_get_contents($_FILES["image"]["tmp_name"]));
$imageType = mysql_real_escape_string($_FILES["image"]["type"]);
$query = "insert into news (title, subject, visiable, image, section_id) values ('$title','$subject', '$visiable', '$imageData', '$sectionID')";
$result = mysql_query($query);
$id = mysql_insert_id();
$data = array(
'id' => $id
);
$base = '../../show.php';
$url = $base. '?' . http_build_query($data);
header("Location: $url");
exit();
?>
如何获取所选项目 ob dropbox(combobox) 的值并将值添加到数据库?,对不起我的英语不好