-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitemView.php
More file actions
74 lines (67 loc) · 2.51 KB
/
itemView.php
File metadata and controls
74 lines (67 loc) · 2.51 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
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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include './_functions.php';
include './_itemService.php';
//search the item by ID
// echo "Last ID :" . $item_id;
$item_id = $_GET['id'];
$result = getItemByID($item_id);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while ($row = mysqli_fetch_assoc($result)) {
// echo "brand: ";
// echo $row["brand"] . " - model: " . $row["model"] . "<br>";
?>
<table width="100%" border="0">
<tr>
<td width="50%" align="right">Category (Item Name)</td>
<td width="50%"><?php echo $row["category"]; ?></td>
</tr>
<tr>
<td align="right">Brand</td>
<td><?php echo $row["brand"]; ?></td>
</tr>
<tr>
<td align="right">Model</td>
<td><?php echo $row["model"]; ?></td>
</tr>
<tr>
<td align="right">Selling Price</td>
<td><?php echo $row["selling_price"]; ?></td>
</tr>
<tr>
<td align="right">Min Price</td>
<td><?php echo $row["min_price"]; ?></td>
</tr>
<tr>
<td align="right">Store Area</td>
<td><?php echo $row["description"]; ?></td>
</tr>
<tr>
<td align="right">Description </td>
<td><?php echo $row["itmdescription"]; ?></td>
</tr>
<tr>
<td> </td>
<td><img src="item_images/<?php echo $row["image_path"]; ?>" width="150" height="150" /></td>
</tr>
</table>
<?php
}
} else {
echo "0 results";
}
?>
</body>
</html>