teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

7

終端セミコロンを追加しました。申し訳ございません。

2021/07/05 03:45

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -7,8 +7,8 @@
7
7
  //index.php
8
8
  $get_logout1 = filter_input('INPUT_POST','log_out_button');
9
9
  $get_logout2 = $_POST['log_out_button'];
10
- var_dump($get_logout1)//NULL
10
+ var_dump($get_logout1);//NULL
11
- var_dump($get_logout2)//logout
11
+ var_dump($get_logout2);//logout
12
12
  ?>
13
13
 
14
14
  <form class="" action="index.php" method="post">

6

調整させていただきました。たびたび申し訳ございません。

2021/07/05 03:45

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,7 @@
8
8
  $get_logout1 = filter_input('INPUT_POST','log_out_button');
9
9
  $get_logout2 = $_POST['log_out_button'];
10
10
  var_dump($get_logout1)//NULL
11
- var_dump($get_logout1)//logout
11
+ var_dump($get_logout2)//logout
12
12
  ?>
13
13
 
14
14
  <form class="" action="index.php" method="post">

5

HTML5ではinputは閉じタグが廃止されているため、正確な文法に修正しました。

2021/07/05 03:39

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -12,6 +12,6 @@
12
12
  ?>
13
13
 
14
14
  <form class="" action="index.php" method="post">
15
- <input name="log_out_button" type="submit" class="button log_out" title="Sign log_out" value="logout"></input>
15
+ <input name="log_out_button" type="submit" class="button log_out" title="Sign log_out" value="logout">
16
16
  </form>
17
17
  ```

4

体裁調整しました。

2021/07/05 03:37

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -3,8 +3,8 @@
3
3
  よろしくお願い申し上げます。
4
4
 
5
5
  ```html
6
+ <?php
6
7
  //index.php
7
- <?php
8
8
  $get_logout1 = filter_input('INPUT_POST','log_out_button');
9
9
  $get_logout2 = $_POST['log_out_button'];
10
10
  var_dump($get_logout1)//NULL

3

<?php?>の囲いの転記を失念しました。申し訳ございません。

2021/07/05 03:28

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -4,10 +4,12 @@
4
4
 
5
5
  ```html
6
6
  //index.php
7
+ <?php
7
8
  $get_logout1 = filter_input('INPUT_POST','log_out_button');
8
9
  $get_logout2 = $_POST['log_out_button'];
9
10
  var_dump($get_logout1)//NULL
10
11
  var_dump($get_logout1)//logout
12
+ ?>
11
13
 
12
14
  <form class="" action="index.php" method="post">
13
15
  <input name="log_out_button" type="submit" class="button log_out" title="Sign log_out" value="logout"></input>

2

ご指摘に関連するコードを修正しました。

2021/07/05 03:28

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -3,12 +3,13 @@
3
3
  よろしくお願い申し上げます。
4
4
 
5
5
  ```html
6
+ //index.php
6
7
  $get_logout1 = filter_input('INPUT_POST','log_out_button');
7
8
  $get_logout2 = $_POST['log_out_button'];
8
9
  var_dump($get_logout1)//NULL
9
10
  var_dump($get_logout1)//logout
10
11
 
11
- <form class="" action="#" method="post">
12
+ <form class="" action="index.php" method="post">
12
13
  <input name="log_out_button" type="submit" class="button log_out" title="Sign log_out" value="logout"></input>
13
14
  </form>
14
15
  ```

1

コードミスを修正しました。

2021/07/05 03:25

投稿

pegy
pegy

スコア245

title CHANGED
File without changes
body CHANGED
@@ -3,7 +3,7 @@
3
3
  よろしくお願い申し上げます。
4
4
 
5
5
  ```html
6
- $get_logout1 = filter_input('INPUT_POST','button');
6
+ $get_logout1 = filter_input('INPUT_POST','log_out_button');
7
7
  $get_logout2 = $_POST['log_out_button'];
8
8
  var_dump($get_logout1)//NULL
9
9
  var_dump($get_logout1)//logout