玩玩看:
http://qqboxy.twbbs.org/englishtest.php
原碼(DL):
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>不超過10個單字的生活簡單句,看你英文到底行不行!</title> </head> <body> <?php $act = $_GET["action"]; if($act) { $score = 0; $Anser = " 12121"; for($A=1;$A<=5;$A++) { if($Anser[$A]==$_POST["Anser".$A]) $score+=20; } if($score==100) $output .= "滿分耶,英文不錯唷!!<br /><br /><a href=\"englishtest.php\">>返回頁面<</a><br />"; else $output .= "只得到 ".$score." 分,<a href=\"englishtest.php\">再試試看吧</a>!!<br />"; } else { $output .= "<form method=\"POST\" action=\"englishtest.php?action=1\" enctype=\"multipart/form-data\">"; $output .= "不超過10個單字的生活簡單句,看你英文到底行不行!<br /><br />請選擇正確的中文意思:<br /><br />"; $output .= "I'm seeing a guy.<br />"; $output .= "<input name=\"Anser1\" type=\"radio\" value=\"1\" />我最近有約會對象<br />"; $output .= "<input name=\"Anser1\" type=\"radio\" value=\"2\" />我正在看那傢伙<br /><br />"; $output .= "This is just between you and me.<br />"; $output .= "<input name=\"Anser2\" type=\"radio\" value=\"1\" />這是我跟妳之間的阻礙<br />"; $output .= "<input name=\"Anser2\" type=\"radio\" value=\"2\" />這件事我們兩個知道就好<br /><br />"; $output .= "A little bird told me.<br />"; $output .= "<input name=\"Anser3\" type=\"radio\" value=\"1\" />我聽說的<br />"; $output .= "<input name=\"Anser3\" type=\"radio\" value=\"2\" />那小鳥曾經對我叫<br /><br />"; $output .= "He is hitting on you.<br />"; $output .= "<input name=\"Anser4\" type=\"radio\" value=\"1\" />他打你<br />"; $output .= "<input name=\"Anser4\" type=\"radio\" value=\"2\" />他對你有意思<br /><br />"; $output .= "You made your own bed.<br />"; $output .= "<input name=\"Anser5\" type=\"radio\" value=\"1\" />你自找的<br />"; $output .= "<input name=\"Anser5\" type=\"radio\" value=\"2\" />你自己鋪床<br /><br />"; $output .= "<input type=\"submit\" value=\"送出\"></form>"; } echo $output; ?> </body> </html>
沒有留言:
張貼留言