所以我忙于我的php,我遇到了一个问题,我填写了一个下拉列表但是如何获得用户选择的值?
<?php
echo "Please select the date:";
echo "<select id=data name=data>";
for($i = 0; $i < $leng; $i++)
{
echo "<option value=$date[$i]>$date[$i]</option>";
}
echo"</select>";
$selected_key = $_POST['data'];
$selected_val = $date[$_POST['data']];
echo $selected_key;
echo $selected_val;
mysql_close();
?>