《サンプル1》
<form method="GET" action="step9.php">//formタグのactionに呼び出すスクリプトを指定 |
《サンプル2》
<form method="GET" action="step9.php"> (1) のテキストボックスに文字を入力して[送信]をクリックしてください。 < p>(1)<input type="text" name="text1" size="40"> <input type="submit" value="送信" name="ok"></p> < p>(2)<input type="text" name="text2" size="40" value="<? echo $_GET['text1'] ?>"></p> < /form> |
《サンプル3》
<
form method="GET" action="step9.php"><p> < input type="submit" value="男性" name="man"> < input type="submit" value="女性" name="woman"><p> < input type="radio" value="1" name="seibetu" <? if ($_GET["man"]) { print("checked"); } ?>>男性</p> < p><input type="radio" value="2" name="seibetu" <? if ($_GET["woman"]) { print("checked"); } ?>>女性</p> < /form> |
《サンプル4》
<p><input type="checkbox" value="ON" name="man" <?
if ($_GET["man"] == "ON") { print("checked");
} ?>>男性</p> < p><input type="checkbox" value="ON" name="woman" <? if ($_GET["woman"] == "ON") { print("checked"); } ?>>女性</p> |