有谁知道为什么这会显示错误消息?我已经厌倦了空和布尔测试。
谢谢!
<p>You have nearly a full tank of fuel at <?php echo $intFuelGallons ?> gallons.</p>
<p> Do you want to top off your tank?
<label>
<input type="radio" name="TankTopOff" value="Yes" id="TankTopOff">
Yes</label>
<label>
<input type="radio" name="TankTopOff" value="No" id="TankTopOff">
No</label>
</p>
<p><?php echo $varWornTires ?> of your tires are worn. Do you want to replace any of them?</p>
<label>
<input type="radio" name="TireReplace" value="Yes" id="TireReplace">
Yes</label>
<label>
<label>
<input type="radio" name="TireReplace" value="No" id="TireReplace">
No</label>
<label>
<?php
if ((($_POST['TankTopOff'])!=="No") || (($_POST['TankTopOff'])!=="Yes")) {
$errorMessage .= "<li><h5>You forgot to choose if you want to top off your tank! " . ($_POST['TankTopOff']) . "</h5></li>";
};
if ((($_POST['TireReplace'])!=="No") || (($_POST['TireReplace'])!=="Yes")) {
$errorMessage .= "<li><h5>You forgot to choose if you want to replace any tires! ". ($_POST['TireReplace']) . "</h5></li>";
};
?>