全部, 我有以下页面: http://tinyurl.com/7lzr6qo
原始表单代码为:
<form id="dj_feedback" name="dj_feedback" action="../test-save-feedback" method="post">
<br>
<h2>How was the Event?</h2>
<hr>
<table><tr><td width="100px" valign="middle">
<b>Person<font color="#FF0000"> * </font></b>
</td><td valign="middle">
<select name="dj_name" id="dj_name">
<option value="original"></option>
<?php
$qrydj = "Select user_id, first_name, last_name from users where role='employee'";
$resultdj = mysql_query($qrydj);
while($resultsetdj = mysql_fetch_array($resultdj)){
?>
<option value="<?php echo $resultsetdj['user_id']; ?>"><?php echo $resultsetdj['first_name']." ".$resultsetdj['last_name']; ?></option>
<?php
}
?>
</select></td>
</tr>
</table>
<button class="submit" name="submit_feedback" value="submit_feedback">Get Paid!</button>
</form>
当我查看下拉源时,它在select上有一个值,然后在我的第二页上,我只有一个简单的echo语句来查看传递的内容如下:
<?php
session_start();
$user_id = $_POST['dj_name'];
echo "The user id is: ".$user_id;
?>
然而,当我发布这个时,下拉菜单中选择的值不会被传递。在其他浏览器中,这非常好用。
有谁知道为什么这不能正常工作?
谢谢!
答案 0 :(得分:1)
您可能需要让IE知道按钮元素实际上是在提交表单 - 也许编辑您的按钮:
<button type="submit" class="submit" name="submit_feedback" value="submit_feedback">Get Paid!</button>
请注意,type属性是有效的: http://www.w3schools.com/tags/tag_button.asp