質問編集履歴
4
コード内容変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -352,6 +352,56 @@
|
|
352
352
|
|
353
353
|
```php
|
354
354
|
|
355
|
+
<?php
|
356
|
+
|
357
|
+
session_start();
|
358
|
+
|
359
|
+
require('../dbconnect.php');
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
if(!isset($_SESSION['join'])) {
|
364
|
+
|
365
|
+
header('Location: index.php');
|
366
|
+
|
367
|
+
exit();
|
368
|
+
|
369
|
+
}
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
if(!empty($_POST)) {
|
374
|
+
|
375
|
+
//登録処理をする
|
376
|
+
|
377
|
+
$statement = $db->prepare('INSERT INTO members SET name=?, email=?, password=?, picture=?, created=NOW()');
|
378
|
+
|
379
|
+
$ret = $statement->execute(array(
|
380
|
+
|
381
|
+
$_SESSION['join']['name'],
|
382
|
+
|
383
|
+
$_SESSION['join']['email'],
|
384
|
+
|
385
|
+
shal($_SESSION['join']['password']),
|
386
|
+
|
387
|
+
$_SESSION['join']['image']
|
388
|
+
|
389
|
+
));
|
390
|
+
|
391
|
+
unset($_SESSION['join']);
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
header('Location: thanks.php');
|
396
|
+
|
397
|
+
exit();
|
398
|
+
|
399
|
+
}
|
400
|
+
|
401
|
+
?>
|
402
|
+
|
403
|
+
|
404
|
+
|
355
405
|
<!DOCTYPE html>
|
356
406
|
|
357
407
|
<html lang="ja">
|
@@ -378,53 +428,7 @@
|
|
378
428
|
|
379
429
|
<main>
|
380
430
|
|
381
|
-
|
431
|
+
|
382
|
-
|
383
|
-
session_start();
|
384
|
-
|
385
|
-
require('../dbconnect.php');
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
if(!isset($_SESSION['join'])) {
|
390
|
-
|
391
|
-
header('Location: index.php');
|
392
|
-
|
393
|
-
exit();
|
394
|
-
|
395
|
-
}
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
if(!empty($_POST)) {
|
400
|
-
|
401
|
-
//登録処理をする
|
402
|
-
|
403
|
-
$statement = $db->prepare('INSERT INTO members SET name=?, email=?, password=?, picture=?, created=NOW()');
|
404
|
-
|
405
|
-
echo $ret = $statement->execute(array(
|
406
|
-
|
407
|
-
$_SESSION['join']['name'],
|
408
|
-
|
409
|
-
$_SESSION['join']['email'],
|
410
|
-
|
411
|
-
shal($_SESSION['join']['password']),
|
412
|
-
|
413
|
-
$_SESSION['join']['image']
|
414
|
-
|
415
|
-
));
|
416
|
-
|
417
|
-
unset($_SESSION['join']);
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
header('Location: thanks.php');
|
422
|
-
|
423
|
-
exit();
|
424
|
-
|
425
|
-
}
|
426
|
-
|
427
|
-
?>
|
428
432
|
|
429
433
|
|
430
434
|
|
3
テーブル内容の記載方法変更。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,27 +22,31 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
|
26
|
-
|
27
25
|
データベース名:mini_bbs
|
28
26
|
|
29
27
|
テーブル名:members
|
30
28
|
|
29
|
+
|
30
|
+
|
31
|
-
テーブル構造:
|
31
|
+
|テーブル構造:|定義|AI|
|
32
|
+
|
32
|
-
|
33
|
+
|:--|:--:|--:|
|
34
|
+
|
33
|
-
id
|
35
|
+
|id|INT(11)|○
|
34
|
-
|
36
|
+
|
35
|
-
name
|
37
|
+
name|VARCHER(255)
|
36
|
-
|
38
|
+
|
37
|
-
email
|
39
|
+
email|VARCHER(255)
|
38
|
-
|
40
|
+
|
39
|
-
password
|
41
|
+
password|VARCHER(100)
|
40
|
-
|
42
|
+
|
41
|
-
picture
|
43
|
+
picture|VARCHER(255)
|
42
|
-
|
44
|
+
|
43
|
-
created
|
45
|
+
created|DATETIME
|
44
|
-
|
46
|
+
|
45
|
-
modified
|
47
|
+
modified|TIMESTAMP
|
48
|
+
|
49
|
+
|
|
46
50
|
|
47
51
|
|
48
52
|
|
2
コード記述変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,10 +46,10 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
|
50
|
-
|
51
49
|
【dbconnect.php】
|
52
50
|
|
51
|
+
```php
|
52
|
+
|
53
53
|
<!DOCTYPE html>
|
54
54
|
|
55
55
|
<html lang="ja">
|
@@ -104,12 +104,16 @@
|
|
104
104
|
|
105
105
|
</html>
|
106
106
|
|
107
|
+
```
|
108
|
+
|
107
109
|
|
108
110
|
|
109
111
|
|
110
112
|
|
111
113
|
【index.php】
|
112
114
|
|
115
|
+
```php
|
116
|
+
|
113
117
|
<!DOCTYPE html>
|
114
118
|
|
115
119
|
<html lang="ja">
|
@@ -334,12 +338,16 @@
|
|
334
338
|
|
335
339
|
</html>
|
336
340
|
|
341
|
+
```
|
342
|
+
|
337
343
|
|
338
344
|
|
339
345
|
|
340
346
|
|
341
347
|
【check.php】
|
342
348
|
|
349
|
+
```php
|
350
|
+
|
343
351
|
<!DOCTYPE html>
|
344
352
|
|
345
353
|
<html lang="ja">
|
@@ -466,12 +474,16 @@
|
|
466
474
|
|
467
475
|
</html>
|
468
476
|
|
477
|
+
```
|
478
|
+
|
469
479
|
|
470
480
|
|
471
481
|
|
472
482
|
|
473
483
|
【thanks.php】
|
474
484
|
|
485
|
+
```php
|
486
|
+
|
475
487
|
<!DOCTYPE html>
|
476
488
|
|
477
489
|
<html lang="ja">
|
@@ -510,6 +522,12 @@
|
|
510
522
|
|
511
523
|
</html>
|
512
524
|
|
525
|
+
```
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
513
531
|
|
514
532
|
|
515
533
|
|
1
タイトルの誤字
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
PHPでデータのINSERT
|
1
|
+
PHPでデータのINSERTができない
|
test
CHANGED
File without changes
|