質問編集履歴
2
コードの余計なインデックス削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,71 +12,71 @@
|
|
12
12
|
|
13
13
|
```html
|
14
14
|
|
15
|
-
|
15
|
+
<div class="form">
|
16
16
|
|
17
|
-
|
17
|
+
<form action="index.php" method="post">
|
18
18
|
|
19
|
-
|
19
|
+
<input type="text" name="comment">
|
20
20
|
|
21
|
-
|
21
|
+
<br>
|
22
22
|
|
23
|
-
|
23
|
+
<input type="submit" value="送信">
|
24
24
|
|
25
|
-
|
25
|
+
</form>
|
26
26
|
|
27
|
-
|
27
|
+
</div>
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
|
31
|
+
<div class="siritori-spaces">
|
32
32
|
|
33
|
-
|
33
|
+
<?php
|
34
34
|
|
35
|
-
|
35
|
+
for($i=1; $i <= 10; $i++){
|
36
36
|
|
37
|
-
|
37
|
+
?>
|
38
38
|
|
39
|
-
|
39
|
+
<div class="item">
|
40
40
|
|
41
|
-
|
41
|
+
<div class="space" style="height: 50px; width:200px; border:2px solid black; float: left;">
|
42
42
|
|
43
|
-
|
43
|
+
<p>
|
44
44
|
|
45
|
-
|
45
|
+
<?php
|
46
46
|
|
47
|
-
|
47
|
+
$boxNumber = $i;
|
48
48
|
|
49
|
-
|
49
|
+
if(isset($_POST['comment'])){
|
50
50
|
|
51
|
-
|
51
|
+
$comment = $_POST['comment'];
|
52
52
|
|
53
|
-
|
53
|
+
if($i === $boxNumber){
|
54
54
|
|
55
|
-
|
55
|
+
echo $boxNumber.".".$comment;
|
56
56
|
|
57
|
-
|
57
|
+
}
|
58
58
|
|
59
|
-
|
59
|
+
}
|
60
60
|
|
61
|
-
|
61
|
+
?>
|
62
62
|
|
63
|
-
|
63
|
+
</p>
|
64
64
|
|
65
|
-
|
65
|
+
</div>
|
66
66
|
|
67
|
-
|
67
|
+
<div class="arrow">
|
68
68
|
|
69
|
-
|
69
|
+
<p>==></p>
|
70
70
|
|
71
|
-
|
71
|
+
</div>
|
72
72
|
|
73
|
-
|
73
|
+
</div>
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
|
77
|
+
<?php }; ?>
|
78
78
|
|
79
|
-
|
79
|
+
</div>
|
80
80
|
|
81
81
|
|
82
82
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|