質問編集履歴
1
質問の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,6 +18,12 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
+
**2021/07/23 追記**
|
22
|
+
|
23
|
+
回答いただいた内容を参考にソースコードを一部修正したところ、エラーは出なくなりましたが相変わらずテーブルにレコード登録されません。
|
24
|
+
|
25
|
+
|
26
|
+
|
21
27
|
### 該当のソースコード
|
22
28
|
|
23
29
|
|
@@ -216,8 +222,102 @@
|
|
216
222
|
|
217
223
|
</html>
|
218
224
|
|
225
|
+
|
226
|
+
|
219
227
|
```
|
220
228
|
|
229
|
+
**2021/07/23 追記(PHP部分を以下のように修正しました)**
|
230
|
+
|
231
|
+
```
|
232
|
+
|
233
|
+
<?php
|
234
|
+
|
235
|
+
session_start();
|
236
|
+
|
237
|
+
require('dbconnect.php');
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
if(!isset($_SESSION['join'])){
|
242
|
+
|
243
|
+
header('Location:index.php');
|
244
|
+
|
245
|
+
exit();
|
246
|
+
|
247
|
+
}
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
if(!empty($_POST)){
|
252
|
+
|
253
|
+
$statement=$db->prepare('INSERT INTO question_form SET
|
254
|
+
|
255
|
+
nameSei=?,
|
256
|
+
|
257
|
+
nameMei=?,
|
258
|
+
|
259
|
+
gender=?,
|
260
|
+
|
261
|
+
year=?,
|
262
|
+
|
263
|
+
address1=?,
|
264
|
+
|
265
|
+
address2=?,
|
266
|
+
|
267
|
+
phone=?,
|
268
|
+
|
269
|
+
email=?,
|
270
|
+
|
271
|
+
question=?,
|
272
|
+
|
273
|
+
create_at=NOW()
|
274
|
+
|
275
|
+
');
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
$nameSei = $_SESSION['join']['nameSei'];
|
280
|
+
|
281
|
+
$nameMei = $_SESSION['join']['nameMei'];
|
282
|
+
|
283
|
+
$gender = $_SESSION['join']['gender'];
|
284
|
+
|
285
|
+
$year = $_SESSION['join']['year'];
|
286
|
+
|
287
|
+
$address1 = $_SESSION['join']['address1'];
|
288
|
+
|
289
|
+
$address2 = $_SESSION['join']['address2'];
|
290
|
+
|
291
|
+
$phone = $_SESSION['join']['phone'];
|
292
|
+
|
293
|
+
$email = $_SESSION['join']['email'];
|
294
|
+
|
295
|
+
$question = $_SESSION['join']['question'];
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
echo $ret=$statement->bind_param('ssssissss', $nameSei, $nameMei, $gender, $year, $address1, $address2, $phone, $email, $question);
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
$statement->execute();
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
unset($_SESSION['join']);
|
308
|
+
|
309
|
+
header('Location: Recieve.php');
|
310
|
+
|
311
|
+
exit();
|
312
|
+
|
313
|
+
}
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
?>
|
318
|
+
|
319
|
+
```
|
320
|
+
|
221
321
|
|
222
322
|
|
223
323
|
### 試したこと
|