質問編集履歴
2
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
以下のようにPHPとHTMLを使用しお問合せフォームを作りました。(contact.php)
|
2
2
|
|
3
|
-
確認するボタンを押すと「confirm.php」へも飛び、contact.phpで打ったものを反映させるようにしたいのですが
|
3
|
+
確認するボタンを押すと「confirm.php」へも飛び、contact.phpで打ったものを反映させるようにしたいのですが飛びません。
|
4
4
|
|
5
5
|
|
6
6
|
|
@@ -8,19 +8,11 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
どのようにしたら出ますでしょうか?
|
12
|
-
|
13
|
-
また、このcontact.phpそのものにエラーがかかってしまいました。
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
お力添えお願いします。
|
18
|
-
|
19
11
|
必要に応じgit.hubでの公開も可能です。
|
20
12
|
|
21
13
|
|
22
14
|
|
23
|
-
|
15
|
+
|
24
16
|
|
25
17
|
```php
|
26
18
|
|
@@ -38,7 +30,7 @@
|
|
38
30
|
|
39
31
|
|
40
32
|
|
41
|
-
|
33
|
+
|
42
34
|
|
43
35
|
if ($post['name'] === '') {
|
44
36
|
|
@@ -56,6 +48,12 @@
|
|
56
48
|
|
57
49
|
}
|
58
50
|
|
51
|
+
if ($post['tel'] === '') {
|
52
|
+
|
53
|
+
$error['tel'] = 'blank';
|
54
|
+
|
55
|
+
}
|
56
|
+
|
59
57
|
if ($post['contact'] === '') {
|
60
58
|
|
61
59
|
$error['contact'] = 'blank';
|
@@ -66,7 +64,7 @@
|
|
66
64
|
|
67
65
|
if (count($error) === 0) {
|
68
66
|
|
69
|
-
|
67
|
+
|
70
68
|
|
71
69
|
$_SESSION['form'] = $post;
|
72
70
|
|
@@ -88,35 +86,25 @@
|
|
88
86
|
|
89
87
|
?>
|
90
88
|
|
89
|
+
|
90
|
+
|
91
91
|
<!DOCTYPE html>
|
92
92
|
|
93
|
-
<html lang="ja">
|
94
|
-
|
95
93
|
<html lang="ja">
|
96
94
|
|
97
95
|
<head>
|
98
96
|
|
99
|
-
|
100
|
-
|
101
97
|
<meta charset="UTF-8">
|
102
98
|
|
103
99
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
104
100
|
|
105
|
-
|
106
|
-
|
107
101
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
108
102
|
|
109
103
|
<link rel="shortcut icon" href="assets/images/logo2-160x136.png" type="image/x-icon">
|
110
104
|
|
111
105
|
<meta name="description" content="">
|
112
106
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
<title>
|
107
|
+
<title>contact</title>
|
118
|
-
|
119
|
-
<link rel="stylesheet" href="assets/web/assets/mobirise-icons/mobirise-icons.css">
|
120
108
|
|
121
109
|
<link rel="stylesheet" href="assets/tether/tether.min.css">
|
122
110
|
|
@@ -130,6 +118,12 @@
|
|
130
118
|
|
131
119
|
<link rel="stylesheet" href="assets/dropdown/css/style.css">
|
132
120
|
|
121
|
+
<link rel="stylesheet" href="assets/formstyler/jquery.formstyler.css">
|
122
|
+
|
123
|
+
<link rel="stylesheet" href="assets/formstyler/jquery.formstyler.theme.css">
|
124
|
+
|
125
|
+
<link rel="stylesheet" href="assets/datepicker/jquery.datetimepicker.min.css">
|
126
|
+
|
133
127
|
<link rel="stylesheet" href="assets/theme/css/style.css">
|
134
128
|
|
135
129
|
<link rel="preload" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
@@ -144,204 +138,250 @@
|
|
144
138
|
|
145
139
|
</head>
|
146
140
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
141
|
+
<body>
|
142
|
+
|
143
|
+
<section class="extMenu11 menu cid-sPFSaL3757" once="menu" id="extMenu11-8q">
|
144
|
+
|
145
|
+
<nav class="navbar navbar-expand beta-menu navbar-dropdown align-items-center navbar-fixed-top navbar-toggleable-sm">
|
146
|
+
|
147
|
+
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
148
|
+
|
149
|
+
<div class="hamburger">
|
150
|
+
|
151
|
+
<span></span>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<span></span>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</button>
|
160
|
+
|
161
|
+
<div class="menu-logo">
|
162
|
+
|
163
|
+
<div class="navbar-brand">
|
164
|
+
|
165
|
+
<span class="navbar-logo">
|
166
|
+
|
167
|
+
<a href="index.html">
|
168
|
+
|
169
|
+
<img src="assets/images/logo2-160x136.png" alt="菜々海" style="height: 6rem;">
|
170
|
+
|
171
|
+
</a>
|
172
|
+
|
173
|
+
</span>
|
174
|
+
|
175
|
+
<span class="navbar-caption-wrap">
|
176
|
+
|
177
|
+
<a class="navbar-caption text-black text-primary display-5" href="index.html">一般社団法人</a>
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
186
|
+
|
187
|
+
<ul class="navbar-nav nav-dropdown" data-app-modern-menu="true">
|
188
|
+
|
189
|
+
<li class="nav-item">
|
190
|
+
|
191
|
+
<a class="nav-link link text-black text-primary display-4" href="index.html">ホーム</a>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
//省略
|
196
|
+
|
197
|
+
</ul>
|
198
|
+
|
199
|
+
<div class="navbar-buttons mbr-section-btn"><a class="btn btn-sm btn-warning display-4" href="contact.html">問い合わせる</a></div>
|
200
|
+
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</nav>
|
204
|
+
|
205
|
+
</section>
|
206
|
+
|
207
|
+
<section class="content5 cid-sPFS2QoTlQ" id="content5-8p">
|
208
|
+
|
209
|
+
<div class="container">
|
210
|
+
|
211
|
+
<div class="row justify-content-center">
|
212
|
+
|
213
|
+
<div class="col-md-12 col-lg-10">
|
214
|
+
|
215
|
+
<p class="mbr-text mbr-fonts-style display-2"><strong>お問い合わせフォーム</strong></p>
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
</div>
|
222
|
+
|
223
|
+
</section>
|
224
|
+
|
225
|
+
<section class="form1 directm4_form1 cid-sDvvMLREBx" id="form1-4p">
|
226
|
+
|
227
|
+
<div class="container">
|
228
|
+
|
229
|
+
<div class="row justify-content-center mt-5">
|
230
|
+
|
231
|
+
<div class="col-lg-9 mbr-form form" data-form-type="formoid">
|
232
|
+
|
233
|
+
<form action="./contact.php" method="POST">
|
234
|
+
|
235
|
+
<div class="row justify-content-center">
|
236
|
+
|
237
|
+
<div class="col-md-8">
|
238
|
+
|
239
|
+
<p class="mbr-text mbr-fonts-style align-center mb-4 display-7">お客さまからのお問い合わせをお問い合わせフォームにて受け付けております。
|
240
|
+
|
241
|
+
<br>必要事項をご記入の上、「確認画面」を押してください。 </p>
|
242
|
+
|
243
|
+
<div class="form-row">
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div class="dragArea form-row">
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
<div class="col-lg-12 form-group" data-for="name">
|
254
|
+
|
255
|
+
<label for="inputName">お名前</label>
|
256
|
+
|
257
|
+
<input type="text" name="name" id="inputName" class="form-control" value="<?php echo htmlspecialchars($post['name']); ?>" required autofocus>
|
258
|
+
|
259
|
+
<?php if ($error['name'] === 'blank'): ?>
|
260
|
+
|
261
|
+
<p class="error_msg">※お名前をご記入下さい</p>
|
262
|
+
|
263
|
+
<?php endif; ?>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<div class="col-lg-12 form-group" data-for="email">
|
270
|
+
|
271
|
+
<label for="inputName">メールアドレス</label>
|
272
|
+
|
273
|
+
<input type="email" name="email" id="inputEmail" class="form-control" value="<?php echo htmlspecialchars($post['email']); ?>" required>
|
274
|
+
|
275
|
+
<?php if ($error['email'] === 'blank'): ?>
|
276
|
+
|
277
|
+
<p class="error_msg">※メールアドレスをご記入下さい</p>
|
278
|
+
|
279
|
+
<?php endif; ?>
|
280
|
+
|
281
|
+
<?php if ($error['email'] === 'email'): ?>
|
282
|
+
|
283
|
+
<p class="error_msg">※メールアドレスを正しくご記入ください</p>
|
284
|
+
|
285
|
+
<?php endif; ?>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<div data-for="tel" class="col-lg-12 form-group">
|
292
|
+
|
293
|
+
<label for="inputName">電話番号</label>
|
294
|
+
|
295
|
+
<input type="tel" name="tel" id="inputName" class="form-control" value="<?php echo htmlspecialchars($post['tel']); ?>" required autofocus>
|
296
|
+
|
297
|
+
<?php if ($error['tel'] === 'blank'): ?>
|
298
|
+
|
299
|
+
<p class="error_msg">※電話番号をご記入下さい</p>
|
300
|
+
|
301
|
+
<?php endif; ?> </div>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<div class="col-12 form-group" data-for="textarea">
|
306
|
+
|
307
|
+
<textarea name="contact" id="inputContent" rows="10" class="form-control" required><?php echo htmlspecialchars($post['contact']); ?></textarea>
|
308
|
+
|
309
|
+
<?php if ($error['contact'] === 'blank'): ?>
|
310
|
+
|
311
|
+
<p class="error_msg">※お問い合わせ内容をご記入下さい</p>
|
312
|
+
|
313
|
+
<?php endif; ?>
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
<div class="col-auto mbr-section-btn align-center">
|
320
|
+
|
321
|
+
<button type="submit" class="btn btn-md btn-warning display-4">確認画面へ</button>
|
322
|
+
|
323
|
+
</div>
|
162
324
|
|
163
325
|
</div>
|
164
326
|
|
165
|
-
</button>
|
166
|
-
|
167
|
-
<div class="menu-logo">
|
168
|
-
|
169
|
-
<div class="navbar-brand">
|
170
|
-
|
171
|
-
<span class="navbar-logo">
|
172
|
-
|
173
|
-
<a href="index.html">
|
174
|
-
|
175
|
-
<img src="assets/images/logo2-160x136.png" alt="菜々海" style="height: 6rem;">
|
176
|
-
|
177
|
-
</a>
|
178
|
-
|
179
|
-
</span>
|
180
|
-
|
181
|
-
<span class="navbar-caption-wrap"><a class="navbar-caption text-black text-primary display-5" href="index.html">一般社団法人菜々海</a></span>
|
182
|
-
|
183
|
-
|
327
|
+
</div>
|
184
328
|
|
185
329
|
</div>
|
186
330
|
|
187
|
-
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
188
|
-
|
189
|
-
<ul class="navbar-nav nav-dropdown" data-app-modern-menu="true"><li class="nav-item">
|
190
|
-
|
191
|
-
<a class="nav-link link text-black text-primary display-4" href="index.html">ホーム</a>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<li class="nav-item"><a class="nav-link link text-black text-primary display-4" href="plan.html">プラン内容</a></li>
|
198
|
-
|
199
|
-
<li class="nav-item"><a class="nav-link link text-black text-primary display-4" href="service.html">サービス内容</a></li>
|
200
|
-
|
201
|
-
<li class="nav-item"><a class="nav-link link text-black text-primary display-4" href="news.html">お知らせ</a></li></ul>
|
202
|
-
|
203
|
-
<div class="navbar-buttons mbr-section-btn"><a class="btn btn-sm btn-warning display-4" href="contact.php">問い合わせる</a></div>
|
204
|
-
|
205
|
-
</div>
|
206
|
-
|
207
|
-
</nav>
|
208
|
-
|
209
|
-
</section>
|
210
|
-
|
211
|
-
<!-- お問合せフォーム画面 -->
|
212
|
-
|
213
|
-
<body>
|
214
|
-
|
215
|
-
<div class="container">
|
216
|
-
|
217
|
-
<form action="" method="POST" novalidate>
|
218
|
-
|
219
|
-
<p>お問い合わせ</p>
|
220
|
-
|
221
|
-
<div class="form-group">
|
222
|
-
|
223
|
-
<div class="row">
|
224
|
-
|
225
|
-
<div class="col-2">
|
226
|
-
|
227
|
-
<label for="inputName">お名前</label>
|
228
|
-
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<div class="col-2">
|
232
|
-
|
233
|
-
<p class="require_item">必須</p>
|
234
|
-
|
235
|
-
</div>
|
236
|
-
|
237
|
-
<div class="col-md-8">
|
238
|
-
|
239
|
-
<input type="text" name="name" id="inputName" class="form-control" value="<?php echo htmlspecialchars($post['name']); ?>" required autofocus>
|
240
|
-
|
241
|
-
<?php if ($error['name'] === 'blank'): ?>
|
242
|
-
|
243
|
-
<p class="error_msg">※お名前をご記入下さい</p>
|
244
|
-
|
245
|
-
<?php endif; ?>
|
246
|
-
|
247
|
-
</div>
|
248
|
-
|
249
|
-
</div>
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<div class="form-group">
|
254
|
-
|
255
|
-
<div class="row">
|
256
|
-
|
257
|
-
<div class="col-2">
|
258
|
-
|
259
|
-
<label for="inputEmail">メールアドレス</label>
|
260
|
-
|
261
|
-
</div>
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
<div class="col-2">
|
266
|
-
|
267
|
-
<p class="require_item">必須</p>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
<div class="col-8">
|
274
|
-
|
275
|
-
<input type="email" name="email" id="inputEmail" class="form-control" value="<?php echo htmlspecialchars($post['email']); ?>" required>
|
276
|
-
|
277
|
-
<?php if ($error['email'] === 'blank'): ?>
|
278
|
-
|
279
|
-
<p class="error_msg">※メールアドレスをご記入下さい</p>
|
280
|
-
|
281
|
-
<?php endif; ?>
|
282
|
-
|
283
|
-
<?php if ($error['email'] === 'email'): ?>
|
284
|
-
|
285
|
-
<p class="error_msg">※メールアドレスを正しくご記入ください</p>
|
286
|
-
|
287
|
-
<?php endif; ?>
|
288
|
-
|
289
|
-
</div>
|
290
|
-
|
291
|
-
</div>
|
292
|
-
|
293
|
-
</div>
|
294
|
-
|
295
|
-
<div class="form-group">
|
296
|
-
|
297
|
-
<div class="row">
|
298
|
-
|
299
|
-
<div class="col-2">
|
300
|
-
|
301
|
-
<label for="inputContent">お問い合わせ内容</label>
|
302
|
-
|
303
|
-
</div>
|
304
|
-
|
305
|
-
<div class="col-2">
|
306
|
-
|
307
|
-
<p class="require_item">必須</p>
|
308
|
-
|
309
|
-
</div>
|
310
|
-
|
311
|
-
<div class="col-8">
|
312
|
-
|
313
|
-
<textarea name="contact" id="inputContent" rows="10" class="form-control" required><?php echo htmlspecialchars($post['contact']); ?></textarea>
|
314
|
-
|
315
|
-
<?php if ($error['contact'] === 'blank'): ?>
|
316
|
-
|
317
|
-
<p class="error_msg">※お問い合わせ内容をご記入下さい</p>
|
318
|
-
|
319
|
-
<?php endif; ?>
|
320
|
-
|
321
|
-
</div>
|
322
|
-
|
323
|
-
</div>
|
324
|
-
|
325
|
-
</div>
|
326
|
-
|
327
|
-
<div class="row">
|
328
|
-
|
329
|
-
<div class="col-8 offset-4">
|
330
|
-
|
331
|
-
<button type="submit">確認画面へ</button>
|
332
|
-
|
333
|
-
</div>
|
334
|
-
|
335
|
-
</div>
|
336
|
-
|
337
331
|
</form>
|
338
332
|
|
333
|
+
</div>
|
334
|
+
|
339
335
|
</div>
|
340
336
|
|
337
|
+
</div>
|
338
|
+
|
339
|
+
</section>
|
340
|
+
|
341
|
+
//フッター省略
|
342
|
+
|
343
|
+
<script src="assets/web/assets/jquery/jquery.min.js"></script>
|
344
|
+
|
345
|
+
<script src="assets/popper/popper.min.js"></script>
|
346
|
+
|
347
|
+
<script src="assets/tether/tether.min.js"></script>
|
348
|
+
|
349
|
+
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
350
|
+
|
351
|
+
<script src="assets/smoothscroll/smooth-scroll.js"></script>
|
352
|
+
|
353
|
+
<script src="assets/viewportchecker/jquery.viewportchecker.js"></script>
|
354
|
+
|
355
|
+
<script src="assets/dropdown/js/nav-dropdown.js"></script>
|
356
|
+
|
357
|
+
<script src="assets/dropdown/js/navbar-dropdown.js"></script>
|
358
|
+
|
359
|
+
<script src="assets/touchswipe/jquery.touch-swipe.min.js"></script>
|
360
|
+
|
361
|
+
<script src="assets/formstyler/jquery.formstyler.js"></script>
|
362
|
+
|
363
|
+
<script src="assets/formstyler/jquery.formstyler.min.js"></script>
|
364
|
+
|
365
|
+
<script src="assets/datepicker/jquery.datetimepicker.full.js"></script>
|
366
|
+
|
367
|
+
<script src="assets/theme/js/script.js"></script>
|
368
|
+
|
369
|
+
<script src="assets/formoid/formoid.min.js"></script>
|
370
|
+
|
371
|
+
<div id="scrollToTop" class="scrollToTop mbr-arrow-up">
|
372
|
+
|
373
|
+
<a style="text-align: center;"><i class="mbr-arrow-up-icon mbr-arrow-up-icon-cm cm-icon cm-icon-smallarrow-up"></i></a>
|
374
|
+
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<input name="animation" type="hidden">
|
378
|
+
|
341
379
|
</body>
|
342
380
|
|
343
381
|
</html>
|
344
382
|
|
345
383
|
|
346
384
|
|
385
|
+
|
386
|
+
|
347
387
|
```
|
1
クリックする「404お探しのページが見つかりませんでした」になってしまいますが、phpとして動作させます。 を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,6 +18,10 @@
|
|
18
18
|
|
19
19
|
必要に応じgit.hubでの公開も可能です。
|
20
20
|
|
21
|
+
|
22
|
+
|
23
|
+
追加 クリックする「404お探しのページが見つかりませんでした」になってしまいますが、phpとして動作させます。
|
24
|
+
|
21
25
|
```php
|
22
26
|
|
23
27
|
<?php
|