-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSPDetail.php
75 lines (66 loc) · 2.98 KB
/
SPDetail.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
<?php
require "layout/header.php"
?>
<!-- Start All Pages -->
<div class="all-page-title page-breadcrumb">
<div class="container text-center">
<div class="row">
<div class="col-lg-12">
<h1>Chi tiết sản phẩm</h1>
</div>
</div>
</div>
</div>
<!-- End All Pages -->
<!-- Start About -->
<div class="about-section-box">
<div class="container">
<div class="row">
<?php
$conn = mysqli_connect('localhost', 'root', '', 'wsts-1');
require 'DBconnext.php';
$masp = $_GET['maSanPham'];
$query = mysqli_query($conn, "select * from sanpham a, loaisanpham b where a.maLoaiSanPham = b.maLoaiSanPham and a.maSanPham = $masp ");
while ($row = mysqli_fetch_assoc($query)) {
?>
<div class="col-lg-6 col-md-6 text-center">
<div class="inner-column">
<h1>Chào mừng <span>đến với CHNM</span></h1>
<form action="cart.php" method="post">
<table>
<thead>
<tr>
<th style="width: 80%"><span style="color:cornflowerblue; font-size: x-large;"><?php echo $row['tenSanPham']; ?></span> :</th>
<th style="width: 40%"><span style="color:cornflowerblue; font-size: x-large;"><?php echo $row['giaBan']; ?></span></th>
<th > <input type="number" name="soLuong" min="1" max="10" value="1"></th>
</tr>
</thead>
</table>
<input class="btn btn-lg btn-circle btn-outline-new-white"
type="submit" name="addcart" value="Mua hàng">
<!-- <input type="number" name="soLuong" min="1" max="10" value="1"> -->
<input class="btn btn-lg btn-circle btn-outline-new-white"
type="submit" name="addcart" value="Đặt hàng">
<input type="hidden" name="hinhAnh" value="<?php echo $row['hinhAnh']; ?>">
<input type="hidden" name="tenSanPham" value="<?php echo $row['tenSanPham']; ?>">
<input type="hidden" name="giaBan" value="<?php echo $row['giaBan']; ?>">
</form>
</div>
</div>
<div class="col-lg-6 col-md-6">
<img src="templateUser/images/<?php echo $row['hinhAnh']; ?>" alt="" class="img-fluid">
</div>
<div class="col-md-12">
<div class="inner-pt">
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<!-- End About -->
<?php
require "layout/footer.php"
?>