-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderhistory.php
61 lines (54 loc) · 1.37 KB
/
orderhistory.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
<?php
include('usermenu.php');
$uid=$_SESSION['login'];
$sel="select * from temp where uid='$uid' order by date";
$rel=$con->query($sel);
if(mysqli_num_rows($rel) > 0)
{
echo"<table class='table table-hover' align='center' style='width:70%'>
<tr align='center'>
<th><center>OrderId</center></th>
<th><center>Food Order</center></th>
<th><center>Price</center></th>
<th><center>Quantity</center></th>
<th><center>Total</center></th>
<th><center>Status</center></th>
<th><center>Date</center></th>
<th><center>Action</center></th>
</tr>
";
while($row = mysqli_fetch_array($rel))
{
$orderid=$row['orderid'];
$item=$row['item_name'];
$price=$row['product_price'];
$qnty=$row['item_quantity'];
$total=$row['total'];
$status=$row['status'];
$date=$row['date'];
echo "
<tr align='center'>
<td>".$orderid."</td>
<td>".$item."</td>
<td>".$price."</td>
<td>".$qnty."</td>
<td>".$total."</td>
<td>".$status."</td>
<td>".$date."</td>";
if($status=='Accept' || $status=='Order Placed')
{
echo "<td><a href='deleteorder.php?orderid=".$orderid."&status=".$status."' class='btn btn-danger'>Cancel Order</a></td>";
}
elseif($status='Ready')
{
echo "<td>Done</td>";
}
else
{
echo "<td>In Process</td>";
}
echo"</tr>";
}
echo "</table>";
}
?>