質問編集履歴

2

うまく行かない点の詳細を追記

2018/01/01 13:07

投稿

hilhilyzyan
hilhilyzyan

スコア19

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,23 @@
6
6
 
7
7
  エラーチェックがうまくできません。
8
8
 
9
- 具体的には、のような画面が表示されます
9
+ 具体的には、ブラウザに以下のようなメッセージが表示されます
10
+
11
+ --------------
12
+
13
+ HTTP 500 エラー
14
+
15
+ 申し訳ありません。Web サイトはこのページを表示できません
16
+
17
+ このサイトではメンテナンス中であるか、プログラミング エラーが発生している可能性があります。
18
+
19
+ 対処方法
20
+
21
+ 直前のページに戻る
22
+
23
+ Web サイトの所有者に連絡してください
24
+
25
+ --------------
10
26
 
11
27
 
12
28
 

1

登録フォーム画面の追加、登録フォーム確認画面の修正、うまくいかない場所の図の追加

2018/01/01 13:07

投稿

hilhilyzyan
hilhilyzyan

スコア19

test CHANGED
File without changes
test CHANGED
@@ -6,6 +6,10 @@
6
6
 
7
7
  エラーチェックがうまくできません。
8
8
 
9
+ 具体的には、図のような画面が表示されます。
10
+
11
+
12
+
9
13
  そもそも、エラーチェックのイメージが湧いていないことが原因なのですが、
10
14
 
11
15
  同じ「confirm.php」内なのに、どのようにして表示内容を切り替えるのでしょうか。
@@ -24,12 +28,112 @@
24
28
 
25
29
 
26
30
 
27
-
31
+ 以下、登録フォーム入力画面
28
32
 
29
33
  ```php
30
34
 
35
+
36
+
31
37
  <!DOCTYPE html>
32
38
 
39
+ <html lang = "ja">
40
+
41
+ <head>
42
+
43
+ <meta charset="utf-8">
44
+
45
+ <title>Progate</title>
46
+
47
+ <link rel="stylesheet" type="text/css" href="stylesheet.css">
48
+
49
+ </head>
50
+
51
+ <body>
52
+
53
+
54
+
55
+ <div class="contact-form">
56
+
57
+ <div class="idinput">
58
+
59
+ <form class="form-item" action="confirm.php" method="POST" id="id">
60
+
61
+ <table>
62
+
63
+ <thead>
64
+
65
+ <tr>
66
+
67
+ <th>ID入力ホーム</th>
68
+
69
+ </tr>
70
+
71
+ </thead>
72
+
73
+ <tbody>
74
+
75
+ <tr>
76
+
77
+ <th>学籍番号</th>
78
+
79
+ <td><input type="text" name="idnumber"></td>
80
+
81
+ </tr>
82
+
83
+ <tr>
84
+
85
+ <th>名前</th>
86
+
87
+ <td><input type="text" name="name"></td>
88
+
89
+ </tr>
90
+
91
+ <tr>
92
+
93
+ <th>年齢</th>
94
+
95
+ <td><input type="text" name="age"></td>
96
+
97
+ </tr>
98
+
99
+ </tbody>
100
+
101
+ <tfoot>
102
+
103
+ <tr>
104
+
105
+ <th>備考</th>
106
+
107
+ <td><textarea name="comment" cols="40" rows="5"></textarea></td>
108
+
109
+ </tr>
110
+
111
+ </tfoot>
112
+
113
+ </table>
114
+
115
+ <input type="submit" value="送信">
116
+
117
+ </form>
118
+
119
+ </div>
120
+
121
+ </div>
122
+
123
+ </body>
124
+
125
+ </html>
126
+
127
+
128
+
129
+ ```
130
+
131
+ 以下、登録フォーム確認画面
132
+
133
+ ```php
134
+
135
+ <!DOCTYPE html>
136
+
33
137
  <html>
34
138
 
35
139
  <head>
@@ -42,9 +146,11 @@
42
146
 
43
147
  </head>
44
148
 
149
+ <body>
150
+
45
151
  <form class="form-item" action="complete.php" method="post" id="confirm">
46
152
 
47
- <body>
153
+
48
154
 
49
155
 
50
156
 
@@ -112,7 +218,7 @@
112
218
 
113
219
  <p><?php echo $_POST['comment']; ?></p>
114
220
 
115
- </body>
221
+
116
222
 
117
223
 
118
224
 
@@ -124,6 +230,8 @@
124
230
 
125
231
  <input type="hidden" name="comment" value="<?php echo $_POST['comment']; ?>">
126
232
 
233
+ </form>
234
+
127
235
  }
128
236
 
129
237
  else {
@@ -136,18 +244,16 @@
136
244
 
137
245
  }
138
246
 
139
-
140
-
141
247
  }
142
248
 
143
-
144
-
145
249
  ?>
146
250
 
147
251
 
148
252
 
149
- </form>
253
+ </body>
150
254
 
151
255
  </html>
152
256
 
153
257
  ```
258
+
259
+ この後にcomplete.phpという登録完了画面を作る予定ですが、まだ作成していません。