-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetail_produk.php
67 lines (60 loc) · 1.74 KB
/
detail_produk.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
<?php
include 'header.php';
$kode = mysqli_real_escape_string($conn,$_GET['produk']);
$result = mysqli_query($conn, "SELECT * FROM produk WHERE kode_produk = '$kode'");
$row = mysqli_fetch_assoc($result);
?>
<div class="container">
<h2 style=" width: 100%; border-bottom: 4px solid #ff8680"><b>Detail produk</b></h2>
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<img src="image/produk/<?= $row['image']; ?>" width="400">
</div>
</div>
<div class="col-md-8">
<form action="proses/add.php" method="GET">
<input type="hidden" name="kd_cs" value="<?= $kode_cs; ?>">
<input type="hidden" name="produk" value="<?= $kode; ?>">
<input type="hidden" name="hal" value="2">
<table class="table table-striped">
<tbody>
<tr>
<td><b>Nama</b></td>
<td><?= $row['nama']; ?></td>
</tr>
<tr>
<td><b>Harga</b></td>
<td>Rp.<?= number_format($row['harga']); ?></td>
</tr>
<tr>
<td><b>Deskripsi</b></td>
<td><?= $row['deskripsi']; ?></td>
</tr>
<tr>
<td><b>Jumlah</b></td>
<td><input class="form-control" type="number" min="1" name="jml" value="1" style="width: 155px;"></td>
</tr>
</tbody>
</table>
<?php
if(isset($_SESSION['user'])){
?>
<button type="submit" class="btn btn-success"><i class="glyphicon glyphicon-shopping-cart"></i> Tambahkan ke Keranjang</button>
<?php
}else{
?>
<a href="keranjang.php" class="btn btn-success"><i class="glyphicon glyphicon-shopping-cart"></i> Tambahkan ke Keranjang</a>
<?php
}
?>
<a href="index.php" class="btn btn-warning"> Kembali Belanja</a>
</div>
</form>
</div>
</div>
<br>
<br>
<?php
include 'footer.php';
?>