-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadtextpostsbusiness.php
More file actions
32 lines (22 loc) · 972 Bytes
/
Copy pathloadtextpostsbusiness.php
File metadata and controls
32 lines (22 loc) · 972 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
26
27
28
29
30
31
32
<?php
include('db.php');
$postNewCount = $_POST['postNewCount'];
$sql="SELECT * FROM secstories WHERE category='Business' ORDER BY ID DESC LIMIT $postNewCount";
$result= mysqli_query($con,$sql);
$queryResults= mysqli_num_rows($result);
if($queryResults >0) {
while($row = mysqli_fetch_assoc($result)) {
echo "
<div style='height: auto; border-radius: 10px; margin-bottom= 0%; margin-top: 18%; width: 80%;'>
<div style='height: auto; width:100%;padding: 50px; border-radius: 10px; margin-left: 0%;'>".$row['textpost']."</div>
</div>
<div style='height:40px; width:100%; display:flex; margin-top: -8%; background-color: rgb(63, 21, 50);'>
<button class='btn btn-primary' style='margin-left: 5%;'>comment</button>
<button class='btn btn-primary'style=' margin-left: 50%;' >share</button>
</div>
";
}
}else{
echo"<script>alert('No record yet')</script>";
}
?>