Help us understand the problem. What is going on with this article?

フォーム作成②

More than 1 year has passed since last update.

フォームで送信した値を確認するために作った物。今回はtableタグを使ったけどしっくり来ない感がある。とは言え他にどのように表記させるか考えても思い浮かばなかったので、現時点ではこれでいいだろう。

学んだこと
$_POST[name属性に指定した値];
これを使ってフォームに入れた値を表示させる

課題
method属性のgetとpostの違いを学ぶこと。

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content ="text/html"  charset="utf-8"/>
  <title>ゲーム作品感想フォーム</title>
</head>

<body>
  <h2>好きなゲーム作品感想投稿サイト</h2>
  <form action ="formTest2.php" method ="post">


<table border ='1'>
  <tr>
    <td>名前</td>
 <td><?php echo $_POST['name'] ?></td>
</tr>
<tr>
  <td>メールアドレス</td>
 <td><?php echo $_POST['mail']?></td>
</tr>
<tr>
  <td>性別</td>
 <td><?php echo $_POST['sex']?></td>
</tr>
<tr>
  <td>ハード</td>
  <td><?php echo $_POST['checkbox']?></td>
</tr>
<tr>
  <td>作品名</td>
 <td><?php echo $_POST['title']?></td>
</tr>
<tr>
  <td>ゲームの感想</td>
 <td><?php echo $_POST['review']?></td>
</tr>
</table>

<input type ="submit" value ="送信">
</form>
</body>
</html>
HahakigI_H
20代後半男。エンジニア志望でプログラミング学習しております。 主に1日の勉強結果をアウトプットする為に投稿します。よろしくお願い致します。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした