-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitemPrint.php
More file actions
executable file
·45 lines (40 loc) · 1.43 KB
/
itemPrint.php
File metadata and controls
executable file
·45 lines (40 loc) · 1.43 KB
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
<?php
session_start();
include_once("php/config.php");
$area_id = $_GET['area_id'];
$result = mysql_query("SELECT * FROM items where area_id='".$area_id."'");
if(mysql_num_rows($result) > 0){
echo "<center>
<h2>Item Report</h2>
<table border='1;solid'>
<tr height='50'>
<th> Area</th>
<th> ID</th>
<th> Description</th>
<th> Quantity</th>
<th> Remarks</th>
</tr>
";
while($row = mysql_fetch_array($result)){
?>
<tr>
<?php
$area_query = mysql_query("SELECT * FROM area_dept where area_id='".$area_id."'");
if(mysql_num_rows($area_query) > 0){
while($row2 = mysql_fetch_array($area_query)){
?>
<td> <?php echo $row2['area_name']; ?></td>
<?php
}
}
?>
<td> <?php echo $row['item_id']; ?></td>
<td> <?php echo $row['item_description'] ?></td>
<td> <?php echo $row['item_quantity'] ?></td>
<td> <?php echo $row['item_status']; ?></td>
</tr>
<?php
}
echo "</table></center>";
}
?>