我是PHP新手,尝试获取从选择标记中选择的选项的值。我熟悉一些输入类型,如广播,文本,复选框e.t.c.我的问题是“type”是从选择标记中选择的选项。前三种形式工作得很好,但不是第四 这里是我的代码什么“类型”是从选择标记中选择的选项
<form action = display.php method="get">
input first name:
<input type=text name=fname><br>
input last name:
<input type=text name=lname><br>
<input type=submit value="Click">
</form>
<form name="input"
action=radio.php method="get">
Username:<input type="text" name="user">
<br>
<input type=radio name=card_type value="visa ">
Visa <br>
<input type=radio name=card_type value="mc">
Master Card <br>
<input type="radio" name=card_type value="discover">
Discover <br>
<input type="submit" value="Submit"/>
</form>
<form name="gender"
action=gender.php method="get">
<input type=radio name=gender_type value="male">
Male <br>
<input type=radio name=gender_type value="female">
Female <br>
<input type="submit" value="Submit"/>
</form>
<form name="chosen_party" action=party.php method="get">
<select>
<option type=text name=party_type value="democrat">Democrat</option>
<option type=text name=party_type value="republican">Republican</option>
<option type=text name=party_type value="independent">Independent</option>
<option type=text name=party_type value="undecided">Undecided</option>
</select>
<input type=submit value="Submit">
</form>
和第四形式的PHP文件...
<?php
$party_select = $_GET['party_type'];
echo "User has chosen $party_select";
?>
另外给出答案,''