質問編集履歴
2
DB
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
post_like_count int(200) default 0
|
|
83
83
|
);
|
|
84
84
|
|
|
85
|
-
create table
|
|
85
|
+
create table favorite_tbl(
|
|
86
86
|
user_id int(10) not null,
|
|
87
87
|
post_id int(10) not null,
|
|
88
88
|
primary key(user_id,post_id)
|
1
HTML部分を追加しました
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
### 該当のソースコード
|
|
19
19
|
```
|
|
20
|
+
<!DOCTYPE html>
|
|
21
|
+
<html>
|
|
22
|
+
<head>
|
|
23
|
+
<meta charset="UTF-8">
|
|
24
|
+
<title>投稿詳細</title>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<?php require 'menu.php';?>
|
|
28
|
+
<?php
|
|
20
29
|
$pdo = new PDO('mysql:host=localhost;dbname=fps;charset=utf8','staff','password');
|
|
21
30
|
$sql=$pdo->prepare('select * from post_tbl where post_id = ?');
|
|
22
31
|
$sql->execute([$_REQUEST['post_id']]);
|
|
@@ -58,6 +67,8 @@
|
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
}
|
|
70
|
+
?>
|
|
71
|
+
<?php require 'footer.php';?>
|
|
61
72
|
```
|
|
62
73
|
### データベース
|
|
63
74
|
```
|