<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<form method="POST" action="request002.php">
<div id="container">
<label for="name">名前:</label>
<input type="text" id="name" name="name">
</div>
<input type="submit" value="送信">
</form>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>フォームの練習</title>
</head>
<body>
こんにちは、
<?php print htmlspecialchars($_POST['name'],ENT_QUOTES, 'UTF-8'); ?>
さん!
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>お問い合わせフォーム</h1>
<form method="POST" action="request002.php">
<p>
<label>名前:
<input type="text" name="name" size="20" maxlength="10" value="お名前"></label></p>
<p>
<label>内容:
<textarea name="subject" rows="5" cols="40">お問い合わせ内容</textarea></label></p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>フォームの練習</title>
</head>
<body>
<p>こんにちは、
<?php print htmlspecialchars($_POST['name'],ENT_QUOTES, 'UTF-8'); ?>
さん!
</p>
<p>お問い合わせ内容を、以下のように受け付けました。<br>
<?php print htmlspecialchars($_POST['subject'],ENT_QUOTES, 'UTF-8'); ?>
</p>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>チェックボックす</h1>
<form method="POST" action="request002.php">
<p>スマートフォン:
<label><input type="checkbox" name="mobile" value="1" checked>iPhone</label>
<label><input type="checkbox" name="mobile" value="2">Android</label>
<label><input type="checkbox" name="mobile" value="3">その他</label>
</p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>ラジオボタン</h1>
<form method="POST" action="request002.php">
<p>性別:
<label><input type="radio" name="sex" value="male" checked>男性</label>
<label><input type="radio" name="sex" value="female">女性</label>
</p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>リスト</h1>
<form method="POST" action="request002.php">
<p>言語:
<select name="language">
<option value="" selected>以下の言語を選択してください</option>
<option value="1" >日本語</option>
<option value="2" >英語</option>
<option value="3" >フランス語</option>
<option value="4" >スペイン語</option>
<option value="5" >韓国語</option>
</select></p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
<p>パスワード:<input type="password" name="password" size="10" maxlength="5"></p>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>ファイルのアップロード</h1>
<form method="POST" action="#" enctype="multipart/form-data">
<p>写真:
<input type="file" name="picture">
</p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>formの練習</title>
</head>
<body>
<div id="container">
<h1>隠しデータの送信</h1>
<form method="POST" action="#">
<p><input type="hidden" name="user_id" value="012345"></p>
<p><input type="submit" value="送信"></p>
</form>
</div>
</body>
</html>
RSSを表示