我有一个包含不同输入字段的表单,例如文本字段、下拉列表和多选列表框。多选列表框不会添加到数据库中。请帮忙
<form action = "A.php" method ="POST" enctype="multipart/form-data">
<fieldset>
<p>`Job Description:
<select name="DutiesDesc[]" size=5 multiple="multiple">
<option value="$Arow['TextF1']"><?php echo $Arow['TextF1']?></option>
<option value="$Arow['TextF2']"><?php echo $Arow['TextF2']?></option>
<option value="$Arow['TextF3']"><?php echo $Arow['TextF3']?></option>
<option value="$Arow['TextF4']"><?php echo $Arow['TextF4']?></option>
<option value="$Arow['TextF5']"><?php echo $Arow['TextF5']?></option>
<option value="$Arow['TextF6']"><?php echo $Arow['TextF6']?></option>
<option value="$Arow['TextF7']"><?php echo $Arow['TextF7']?></option>
<option value="$Arow['TextF8']"><?php echo $Arow['TextF8']?></option>
<option value="$Arow['TextF9']"><?php echo $Arow['TextF9']?></option>
<option value="$Arow['TextF10']"><?php echo $Arow['TextF10']?></option>`
以下部分是A.php
//Check if selections were made
if (isset($_POST['DutiesDesc']))
{
$SkillsArray = $_POST['DutiesDesc'];
foreach($SkillsArray as $key =>$value )
{
$Sentence = join(" ",$value);
}
}
$StartDate = clean($_REQUEST['StartDate']);