-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddresses.php
42 lines (32 loc) · 1 KB
/
addresses.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
38
39
40
41
42
<?php include 'nav.php'?>
<div class="section-gap">
<?php
include 'config.php';
$addresses = [];
$conn = new mysqli('localhost','root','','nnk_fods');
$results = $conn->query('SELECT * FROM address where customer_id = '.$_SESSION['customer']['id']);
if ($results) {?>
<div class="container text-align-center">
<h2>My Addresses</h2>
<a href="add-addr.php" class="btn btn-warning">add address</a>
<div class="row">
<?php while ($address =$results->fetch_assoc()):?>
<div class="card m-2">
<div class="card-body">
<?php echo '<h4 class="mb-0 pb-0">'.$address['addr_name'].'</h4 ><br> '.
$address['street'].'<br>'.
$address['area'].'<br> '.
$address['city'].'<br> '.
$address['region'];
?>
</div>
</div>
<?php endwhile;
echo ' </div></div>';
}else{
echo $conn->error;
}
?>
</div>
</body>
<?php include 'footer.php';?>