我试图从选择框中获取选定的值我用它来获得结果
$receiver=$_POST['receiver'];
但我一直得到结果 0 有人吗?
<form method="post" action="new.php?send">
<label for="select">
<select name="receiver" value="Select" size="1">
<?php
$sql = "SELECT fullname FROM users";
$result = mysql_query($sql) or die (mysql_error());
while ($row = mysql_fetch_array($result))
{
$id=$row["id"];
$name=$row["fullname"];
$options .= '<option name="selected" value="'.$id.'">'.$name.'</option>';
}
echo $options; ?>
</option>
</select>
<input id="send" type="submit" name="Submit" value="Submit">
</form>