-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchorder.php
53 lines (49 loc) · 1.03 KB
/
searchorder.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
<!DOCTYPE html>
<head>
<title>VIEW</title>
<style>
table {
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
}
th{
color:black;
}
</style>
</head>
<body>
<table>
<tr>
<th>PRODUCT ID</th>
<th>QUANTITY</th>
<th>PRICE</th>
<th>TOTAL PRICE</th>
</tr><br>
<?php
$conn=mysqli_connect("localhost","root","","demo");
if(!$conn){
die("connection failed");
}
if(isset($_POST['submit']))
{
$ORD_NO=$_POST['ORD_NO'];
$sql="SELECT ORD_NO,P_ID,QUANTITY,PRICE,TOTAL_PRICE from totorder where ORD_NO='$ORD_NO' ";
$result=mysqli_query($conn,$sql);
while($row=mysqli_fetch_array($result))
{
?>
<tr>
<th><?php echo $row['P_ID']; ?></th>
<th><?php echo $row['QUANTITY']; ?></th>
<th><?php echo $row['PRICE']; ?></th>
<th><?php echo $row['TOTAL_PRICE']; ?></th>
</tr>
<?php
}
}
?>
</table>
</body>
</html>