/
displayproduct.php
52 lines (38 loc) · 1.08 KB
/
displayproduct.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
<?php
error_reporting(E_ALL ^ E_DEPRECATED);
include("lib/connect.php");
ob_start();
if(isset($_POST["product"])){
$Productname = $_POST ["Productname"];
$Productdescription = $_POST ["Productdescription"];
$Productprice = $_POST ["Productprice"];
$Productquantity = $_POST ["Productquantity"];
$Image = $_POST ["Image"];
}
$database = new DB_SQL;
$products = $database->products();
?>
<h2>Display Product<h2>
<?php
$sql = mysql_query("SELECT * FROM product"); ?>
<table id='products'width="1000" border="1" align="center" cellpadding="0">
<?php
while($rows = mysql_fetch_array($products)) {
?>
<img src="products.php?id=1" />
<tr>
<td width="250"><a href="#"><?php echo $rows['Productname']; ?></a></td>
<td width="550"><?php echo $rows['Productdescription']; ?></td>
<td width="100"><?php echo $rows['Productprice']; ?></td>
<td Width="100"><?php echo $rows['Image']; ?></td>
</tr>
<?php
}
?>
</table
?>
<?php
$page_content = ob_get_contents();
ob_clean();
include("masterpage2.php");
?>