-
Notifications
You must be signed in to change notification settings - Fork 1
/
myorder.php
131 lines (109 loc) · 3.5 KB
/
myorder.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
session_start();
if(!isset($_SESSION["sess_email"])){
header("Location: order.php");
}
else
{
?>
<!-- Navigation bar -->
<?php
require_once ('includes/header.php');
?>
<section class="contact-page">
<div class="container">
<br/>
<div class="w3-white" id="tour">
<div class="w3-container w3-content w3-padding-64" style="max-width:900px">
<h2 class="w3-wide w3-center">My Order</h2>
<p class="w3-opacity w3-center"><i></i></p><br>
<div class="w3-container" >
<div class="w3-main w3-content w3-center "">
<div class="w3-row-padding w3-padding-5 w3-center" id="food">
<div class="card mb-6">
<div class="card-header">
<i class="fas fa-table"></i>
My Order</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Order Number</th>
<th>Date</th>
<th>Name</th>
<th>Quantity </th>
<th>Price (RM)</th>
<th>Address</th>
<th>Phone</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
require_once ('mysql_connect.php');
//mysql_connect("localhost","root");
//mysql_select_db("ohnanastore");
$res=mysqli_query($dbc,"SELECT * FROM orders WHERE cust_id = '".$_SESSION['id']."'");
while($row=mysqli_fetch_array($res))
{
?>
<tr>
<td><?php echo $row['order_number']; ?></td>
<td><?php echo $row['ts']; ?></td>
<td><?php echo $row['prod_name']; ?></td>
<td><?php echo $row['quantity']; ?></td>
<td><?php echo $row['price']; ?></td>
<td><?php echo $row['quantity']; ?></td>
<td><?php echo $row['cust_phone']; ?></td>
<td><?php echo $row['order_status']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Page level plugin JavaScript-->
<script src="vendor/datatables/jquery.dataTables.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
<!-- Demo scripts for this page-->
<script src="js/demo/datatables-demo.js"></script>
<style>
#l {
height: 200px;
width: 50%;
background-color: white;
}
body {font-family: "Lato", sans-serif}
.mySlides {display: none}
</style>
</body>
</html>
<?php
}
?>
<!-- <div class='w3-row-padding w3-padding-32' style='margin:0 -16px'>
<div class='w3-third w3-margin-bottom'>
<div class='w3-container w3-white'>
<img src=\"./Picture/{$row['image']}\" alt=\"{$row['name']}\"
style='width:100%' class='w3-hover-opacity'>
<p><b>{$row['name']}</b></p>
<p class='w3-left'><b>RM{$row['price']}</b></p>
<p class='w3-right'><a class='w3-button w3-round-large w3-black'href =\"add_cart.php?pid={$row['id']}\">Add to cart</a></p><br/>
</div>
</div> </div>
</div> </div>
</div> -->