-
Notifications
You must be signed in to change notification settings - Fork 0
/
san-pham.php
53 lines (49 loc) · 1.06 KB
/
san-pham.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
<?php
require("./database.php");
if (isset($_GET["idsp"])) {
$idsp = $_GET["idsp"];
$sql = "SELECT * FROM sanpham WHERE idsp=$idsp";
$result = $con->query($sql);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("./partials/head.php") ?>
<link rel="stylesheet" href="/css/sanpham.css">
<title>Document</title>
</head>
<body>
<?php
if ($result->num_rows == 1) {
$row = $result->fetch_assoc(); ?>
<main class="container sanpham">
<table>
<tr>
<td rowspan="3">
<img src="<?php echo $row["hinhanhsp"] ?>" alt="">
</td>
<td>
<strong>Tên sản phẩm</strong><br>
<?php echo $row["tensp"] ?>
</td>
</tr>
<tr>
<td>
<strong>Chi tiết sản phẩm</strong><br>
<?php echo $row["chitietsp"] ?>
</td>
</tr>
<tr>
<td>
<strong>Giá</strong><br>
<?php echo $row["giasp"] ?>
</td>
</tr>
</table>
</main>
<?php
}
?>
</body>
</html>