我有几组单选按钮,我想在 IF 语句中使用(或者如果你有更好的解决方案)
用户将来到该站点,选择按钮,然后选择提交。提交后,我希望用户立即看到他们应该“ refer patient
”还是“ don't refer patient
”。我不确定几件事:
- 如何使“提交”按钮导致计算输入(意思是,用户得到即时响应)
- 由于有几种输入组合可以创建“引用”或“不引用”响应,我可以在 IF 语句中添加多个条件吗?另外,如何在语句中包含单选按钮 - 我是否只使用按钮的“值”。我只学会了使用数字的非常基本的方法..
以下是我到目前为止的代码。我试图用值开始 IF 语句。不确定是否做对了。
任何帮助是极大的赞赏!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Indications for Mohs</title>
<?php
$Patient_status='unchecked';
$Primary_status='unchecked';
$Type_status='unchecked';
$BCCT_status='unchecked';
$SCCT_status='unchecked';
$Size_status='unchecked';
$Area_status='unchecked';
if (isset($_POST['Submit'])) {
$selected_radio=$_POST['REFER'];
if (selected_radio == "Healthy" && "Primary" && "BCC" && "Aggressive" && "<0.6" && "H" or "Immunocompromised" && "Primary" && "BCC" && "Aggressive" && "<0.6" && "H")
?>
</head>
<body>
<form name="Indications" action="" method="POST">
<p><h2><strong><u>Indications for Mohs Surgery</u></strong></h2>
</p>
<strong>Patient </strong>
<div alighn="center"><br>
<input type="radio" name="Patient" value="Healthy">Healthy<br>
<input type="radio" name="Patient" value="Immunocompromised">Immunocompromised<br>
<input type="radio" name="Patient" value="Genetic">Genetic Syndrome<br>
<hr>
<strong>Primary vs Recurrent</strong>
<div alighn="center"><br>
<input type="radio" name="Primary" value="Primary">Primary<br>
<input type="radio" name="Primary" value="Recurrent">Recurrent<br>
<hr>
<strong>Type</strong>
<div alighn="center"><br>
<input type="radio" name="Type" value="BCC">BCC<br>
<input type="radio" name="Type" value="SCC">SCC<br>
<input type="radio" name="Type" value="LM">LM or MIS<br>
<hr>
<strong>BCC subtype</strong>
<div alighn="center"><br>
<input type="radio" name="BCCT" value="Aggressive">Aggressive<br>
<input type="radio" name="BCCT" value="Nodular">Nodular<br>
<input type="radio" name="BCCT" value="Superficial">Superficial<br>
<hr>
<strong>SCC subtype</strong>
<div alighn="center"><br>
<input type="radio" name="SCCT" value="Aggressive">Aggressive<br>
<input type="radio" name="SCCT" value="Nonaggressive">Nonaggressive<br>
<input type="radio" name="SCCT" value="Verrucous">Verrucous<br>
<input type="radio" name="SCCT" value="KA">KA - type SCC<br>
<input type="radio" name="SCCT" value="Bowen">In situ SCC/Bowen<br>
<input type="radio" name="SCCT" value="AK">AK<br>
<hr>
<strong>Size (cm)</strong>
<div alighn="center"><br>
<input type="radio" name="Size" value="0.5"><0.6<br>
<input type="radio" name="Size" value="0.6-1">0.6-1<br>
<input type="radio" name="Size" value="1.1-2">1.1-2<br>
<input type="radio" name="Size" value="2">>2<br>
<hr>
<strong>Area</strong>
<div alighn="center"><br>
<input type="radio" name="Area" value="H">H<br>
<input type="radio" name="Area" value="M">M<br>
<input type="radio" name="Area" value="L">L<br>
<hr>
<p>
<input type="submit" name="submit" id="submit" value="Submit">
</p>
<p><strong><u>Definitions</u>:</strong><br>
Nonaggressive SCC: <2mm depth without other defining features, Clark level ≤III<br>
Area H: 'Mask Areas' of face (central face, eyelids, eyebrows, nose, lips [cutaneous/mucosal/vermillion], chin, ear, and periauricular skin/sulci, temple), genitalia (including perineal and perianal), hands, feet, nail units, ankles, nipples/areola<br>
Area M: Cheeks, forehead, scalp, neck, jawline, pretibial surface<br>
Area L: Trunk and extremities (excluding pretibial surface, hands, feet, nail units and ankles)</p>
</div>
</form>
</body>
</html>