フォームに入力された値の取り出し
<? $theday = $_POST["theday"]; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ECU-JP"> <title>FORM TEST</title> </head> <body> <FORM METHOD="POST"> 日付を入力してください。<BR> <INPUT TYPE="text" NAME="theday" SIZE="10"><BR> <INPUT TYPE="submit"> </FORM> <?php if(!empty($theday)){ print "入力されたのは" . $theday . "です。"; } ?> </body> </html>
[PHP例題]