0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PHP HTMLのformから飛ばされた内容を受け取って表示する

Posted at

目的

  • HTMLのformタグ内でのinputとtextareaでの入力を受け取って出力する方法をまとめる。

具体的な例

  • 下記にformタグの部分を抜粋したHTMLの内容を記載する。
<form method="post" action="sent.php">
  <input type="text" name="name">
  <textarea name="body"></textarea>
</form>
  • 下記に前述のformタグから送られてきたデータを受け取り表示するPHPの内容を記載する。
echo $_POST["name"];
echo $_POST["body"];
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?