-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexPHP.php
More file actions
25 lines (23 loc) · 815 Bytes
/
indexPHP.php
File metadata and controls
25 lines (23 loc) · 815 Bytes
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
<?php
include 'db_connect.php';
$existsSql="SELECT * FROM `bloglist` ORDER BY `rank` DESC";
$res=mysqli_query($conn,$existsSql);
$num=mysqli_num_rows($res);
if($num>0){
while($row=mysqli_fetch_assoc($res))
{
$blog_writer = $row['UserId'];
$blog_heading = $row['heading'];
$blog_content = $row['content'];
$blog_img = $row['image-source'];
$blog_id = $row['Blog_id'];
$like = $row['likes'];
$dislike = $row['dislikes'];
$rank = ($row['Time']%100000000)-($like-$dislike);
echo $rank;
// $user_id = $_SESSION['userid'];
// echo $idType;
// echo "<img src='$blog_img' >";
}
}
?>