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

<form method="post" name="form1" id="form1">
各星座出生日範圍:
<span>
<input type="radio" name="horoscope" id="radio1" value="aries" />牡羊座
<input type="radio" name="horoscope" id="radio2" value="taurus" />金牛座
<input type="radio" name="horoscope" id="radio3" value="gemini" />雙子座
<input type="radio" name="horoscope" id="radio4" value="cancer" />巨蟹座
<input type="radio" name="horoscope" id="radio5" value="leo" />獅子座
<input type="radio" name="horoscope" id="radio6" value="virgo" />處女座
<input type="radio" name="horoscope" id="radio7" value="libra" />天秤座
<input type="radio" name="horoscope" id="radio8" value="scorpio" />天蠍座
<input type="radio" name="horoscope" id="radio9" value="sagittarius" />射手座
<input type="radio" name="horoscope" id="radio10" value="capricorn" />魔羯座
<input type="radio" name="horoscope" id="radio11" value="aquarius" />水瓶座
<input type="radio" name="horoscope" id="radio12" value="pisces" />雙魚座
&nbsp;&nbsp;&nbsp;&nbsp; </span>
<input name="button" type="submit" id="button" value="顯示" />
</form>

<?
$horoscope=isset($_POST['horoscope'])?$_POST['horoscope']:null;
if ($horoscope != null):
if ($horoscope == "aries"):
echo "<span class=style2>"."3.21 - 4.19"."</span>";
elseif($horoscope == "taurus"):
echo "<span class=style2>"."4.20 - 5.20"."</span>";
elseif($horoscope == "gemini"):
echo "<span class=style2>"."5.21 - 6.21"."</span>";
elseif($horoscope == "cancer"):
echo "<span class=style2>"."6.22 - 7.22"."</span>";
elseif($horoscope == "leo"):
echo "<span class=style2>"."7.23 - 8.22"."</span>";
elseif($horoscope == "virgo"):
echo "<span class=style2>"."8.23 - 9.22"."</span>";
elseif($horoscope == "libra"):
echo "<span class=style2>"."9.23 - 10.23"."</span>";
elseif($horoscope == "scorpio"):
echo "<span class=style2>"."10.24 - 11.21"."</span>";
elseif($horoscope == "sagittarius"):
echo "<span class=style2>"."11.22 - 12.20"."</span>";
elseif($horoscope == "capricorn"):
echo "<span class=style2>"."12.21 - 1.20"."</span>";
elseif($horoscope == "aquarius"):
echo "<span class=style2>"."1.21 - 2.19"."</span>";
else:
echo "<span class=style2>"."2.20 - 3.20"."</span>";
endif;
endif;
?>

範例網頁

arrow
arrow
    全站熱搜

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