簡單的問題,我沒有選擇任何單選按鈕,我得到錯誤信息 未定義指數:性別PHP單選按鈕 - 未定義指數
<?PHP
if(isset($_POST['register'])){
$gender=$_POST['gender'];
echo $gender;
}
?>
<html>
<form action="testing.php" method="POST">
<input type="radio" name="gender" value="male" />Male
<input type="radio" name="gender" value="female" />Female
<input type="submit" name="register" value="Register" />
</form>
</html>