<style type="text/css">
<!--
.style1 {font-size:12px}
.style2 {font-size:12px; color:#FF0000}
-->
</style>

<form method="post" name="form1" id="form1">我開車還是騎機車?
<span>
<input type="radio" name="vechicle" id="radio1" value="car" />開車
<input type="radio" name="vechicle" id="radio2" value="moto" />騎機車&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<input name="button" type="submit" id="button" value="確定" />
</form>

<?
$vechicle=isset($_POST['vechicle'])?$_POST['vechicle']:null;
if ($vechicle != null):
if ($vechicle == "car"):
echo "<span>"."有錢買但還不打算買"."</span>";
else:
echo "<span>"."其實騎機車吹吹風還挺不賴的!"."</span>";
endif;
endif;
?>

範例網頁

arrow
arrow
    全站熱搜

    ALVIN 發表在 痞客邦 留言(0) 人氣()