-
Notifications
You must be signed in to change notification settings - Fork 0
/
store.php
82 lines (64 loc) · 2.15 KB
/
store.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Store</title>
<style>
</style>
<link rel="stylesheet" href="deco.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<style>
.container .card {
justify-content: center;
display: grid;
}
p, h1, h2, h3, h4, h5, h6 {
cursor: auto;
user-select: text !important;
justify-content: center;
display: grid;
}
body, div, a, p, span {
user-select: text !important;
justify-content: center;
display: grid;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-cols-1 row-cols-md-3 g-4">
<div class="col-md-8">
<?php
session_start();
$id=$_SESSION['id'];
$username=$_SESSION['username'];
$cnx = mysqli_connect("localhost","root","","projetphp") or die ("erreur");
$result=mysqli_query($cnx,"SELECT * FROM produit where id=$id" );
$produits=mysqli_fetch_all($result);
foreach ($produits as $produit)
{
echo '<div class="card mb-3 " style="max-width: 540px;">
<div class="row g-0">
<div class="col-md-4">
<img height=200px value='.$produit[4].' name="image" src=./'.$produit[4].' class="img-fluid rounded-start">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">'.$produit[2].'</h5>
<p class="card-text"><small class="text-muted">'.$produit[3].' DH</small></p>
<a href="supression.php?idp='.$produit[1].'">supprimer</a><br>
</div>
</div>
</div>
</div>';
echo ' </div>
<div class="col-md-2"></div>
</div>';
}
// }
?>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
</body>
</html>