-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderDetailsScreen.php
103 lines (82 loc) · 1.87 KB
/
orderDetailsScreen.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
<?php
require 'dbconfig/config.php';
?>
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/homepage.css" rel="stylesheet">
</head>
<body>
<?php
$ordNo = $_GET['ordNo'];
$sql="SELECT * FROM orderr WHERE Ord_No = '$ordNo'";
$date = "";
$total = 0;
$buyer = "";
$status = "";
$res=mysqli_query($con,$sql)
or die(mysqli_error($con));
if($res)
{
while($row=mysqli_fetch_row($res))
{
$date = $row[2];
$total = $row[1];
$buyer = $row[5];
$status = $row[8];
}
}
echo "<div class='panel panel-default'>
<div class='panel-heading main-color-bg'>
<h3 class='panel-title'>Order Details</h3>
</div>
<div class='panel-body'>
<table class='table table-striped table-hover'>
<tr>
<td>Order Number</td>
<td>$ordNo</td>
</tr>
<tr>
<td>Date</td>
<td>$date</td>
</tr>
<tr>
<td>Total</td>
<td>$total</td>
</tr>
<tr>
<td>Buyer</td>
<td>$buyer</td>
</tr>
<tr>
<td>status</td>
<td>$status</td>
</tr>
</table>";
echo "<table class ='table table-striped table-hover'>
<tr>
<th>Product</th>
<th>Quantity</th>
</tr>";
$sql = "SELECT * FROM order_details WHERE order_No = $ordNo";
$res=mysqli_query($con,$sql)
or die(mysqli_error($con));
if ($res){
while($row=mysqli_fetch_row($res)){
echo "<div class='tbl'>";
//echo "<table border=0>
echo "<tr>
<td>$row[2]</td>
<td>$row[3]</td>
</tr>";
echo "</div>";
}
echo"</table>";
echo "</div>";
echo "</div>";
}else{
echo "error".mysql_error();
}
?>
</body>
</html>