-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBills.php
132 lines (92 loc) · 3.21 KB
/
Bills.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
132
<?php
session_start();
?>
<body background="judy.jpg">
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>WholeSaler-Login</title>
<link rel="stylesheet" href="WholeSaler/styles.css" type="text/css" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
</head>
<body>
<section id="body" class="width">
<aside id="sidebar" class="column-left">
<header>
<div style="background-color:lightblue">
<center><h1><font face="verdana" color="black">WHOLESALER LOGIN</font></h1></center>
</div>
<h2>The Complete Info</h2>
</header>
<!--THE LEFT SIDE MENU IS DUE TO THE ABOVE CODE...!!-->
<nav id="mainnav">
<ul>
<li ><a href="wholesaler_login.php">Home</a></li>
<li><a href="supplier.php">Suppliers</a></li>
<li><a href="Bills.php">Orders</a></li>
<li><a href="Logout.php">Logout</a></li>
</ul>
</nav>
</aside>
<section id="content" class="column-right">
<article>
<blockquote><p><p> </p>
<!-- <a href="#" class="button">Read more</a>
<a href="#" class="button button-reversed">Comments</a> -->
<!--IN THIS FIELD WE CAN ADD THE CUSTOMER..-->
<fieldset>
<!--YOU NEED TO WRITE AN ACTION HERE...-->
<!--NEVER USE KEY WORDS AS THE VARIABLES AND NAMES... -->
<legend><strong><h3>Order Information</h3></strong></legend>
<form action="Bills.php" method="POST">
<p><label for="name"><strong>ORDER_ID:</strong></label>
<input type="interger" name="ORDER_ID" id="name" placeholder = "Order-ID" required/><b/></p>
<br>
<p><input type="submit" name="show" class="formbutton" value="Show" /></p>
</form>
</fieldset>
<?php if(isset($_POST['show']))
{
$ORDER_ID=$_POST['ORDER_ID'];
}?>
<fieldset>
<legend><strong><h3>Details for ORDER_ID:<?php echo $ORDER_ID ?> </h3></strong></legend>
<table>
<tr>
<th>ORDER_ID</th>
<th>Supplier_Name</th>
<th>Street</th>
<th>City</th>
<th>State</th>
<th>PhoneNumber</th>
</tr>
<?php
$conn = mysqli_connect("localhost","root","","wholesale");
$sql = "SELECT SUPPLIER_ID,NAME,STREET,CITY,STATE,PHONENUMBER FROM SUPPLIER WHERE SUPPLIER.ORDER_ID= $ORDER_ID";
$result = mysqli_query($conn,$sql);
?>
<?php
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>",$row['SUPPLIER_ID'],"</td>";
echo "<td>",$row['NAME'],"</td>";
echo "<td>",$row['STREET'],"</td>";
echo "<td>",$row['CITY'],"</td>";
echo "<td>",$row['STATE'],"</td>";
echo "<td>",$row['PHONENUMBER'],"</td>";
echo "</tr>";
}
?>
<tr>
</table>
</fieldset>
</article>
<footer class="clear">
<p>© WholeSale Business Managment by Samyuktha and Shirisha </p>
</footer>
</section>
</section>
</body>
</html>