-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow_product.php
More file actions
74 lines (50 loc) · 1.97 KB
/
Copy pathshow_product.php
File metadata and controls
74 lines (50 loc) · 1.97 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
<?php
include('includes/head.php');
include('includes/header.php');
include('includes/db.php');
include('includes/function.php');
?>
</br><br>
<main class="mt-5 ">
<div class="container-fluid">
<!--add div here-->
<div class="row">
<div class="col-md-12">
<?php
include('includes/message.php');
$id = $_GET['id'];
$product = getProductById($id);
/* if(isset($_GET['id']) && !empty($_GET['id'])){
//recuperer toute les donners de la table product
$q = 'SELECT * FROM product WHERE id = :id;';
$stmt = $bdd->prepare($q);
$statuss = $stmt->execute(
array(
'id'=>$_GET['id']
));
if($statuss){
$product = $stmt->fetch();
}
}else{
echo'Product not found error id ';
} */
?>
<!--afficher l'image du produit à gauche -->
<div class="col-md-12">
<img src="./images/<?php echo $product['product_image']; ?>" class="img-fluid" width="400"
height="500" alt="">
</div>
<!--afficher les donners du produit à droite -->
<div class="col-md-6">
<h4><?php echo $product['product_name']; ?></h4>
<p><?php echo $product['product_description']; ?></p>
<p>Price: <?php echo $product['product_price']; ?>$</p>
</div>
<!-- bouton retour au shop -->
<div class="col-md-12">
<a href="shop.php" class="btn btn-primary">Back to shop</a>
</div>
<!--afficher les donners du produit à droite avec bootsrap-->
</div>
</div>
</main>