-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalllike.php
37 lines (32 loc) · 961 Bytes
/
alllike.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!-- display all liked post -->
<!DOCTYPE html>
<html lang="en">
<head>
<link href="fotoapp.css" rel="stylesheet">
<?php
require('nav.php');
require('db.php');
?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>All liked post</title>
</head>
<body>
<?php
session_start();
$sql = "SELECT * FROM `post_like`
inner join `post` ON post_like.Like_post = post.PostID
where post_like.Like_User like '".$_SESSION['username']."'";
$result = $conn->query($sql);
$likesql = "SELECT * FROM `post_like` where Like_User like '".$_SESSION['username']."'";
$like = $conn->query($likesql);
$likerow = $like -> fetchAll();
while($row = $result->fetch())
{
require('printpost.php');
require('likebottom.php');
}
?>
</body>
</html>