-
Notifications
You must be signed in to change notification settings - Fork 0
/
marketplace.php
34 lines (32 loc) · 1.26 KB
/
marketplace.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
<?php
require('inc/config.php');
include_once('inc/functions.php');
$result = "SELECT * FROM ads ORDER BY ad_status";
$_result = mysqli_query($connection, $result) or die("Bad query: $result");
include('inc/header.php');
?>
<div class='container-fluid'>
<div class=row>
<div class='column'>
<?php
if(mysqli_num_rows($_result) > 0){
while($row = mysqli_fetch_assoc($_result)){
echo "
<div class='container' id='ad-listing'>
<a href='ad_listing.php?ID={$row['ad_id']}'>
<img src='images/ad_img/{$row['img']}' alt='market-img' style='width:80%;'/>
</a>
<div id='sidebar'>
<h4>Asking Price: {$row['price']}</h4></br>
<h4>Status: {$row['ad_status']}</h4></br>
<h4>Location: {$row['county']}</h4>
</div></div>"; //trying to write the asking price within the photo link
}
}
?>
</div>
</div>
</div>
<?php
include('inc/footer.php');
?>