-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectOneProduct.php
More file actions
52 lines (48 loc) · 1.86 KB
/
selectOneProduct.php
File metadata and controls
52 lines (48 loc) · 1.86 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
<?php
require_once('./reqSelect.php');
class selectOne{
public function selectOneProduct(){
if(isset($_POST['id'])){
$id=$_POST['id'];
$OneProducts = new select();
$afficherOnePro = $OneProducts->afficherOneProduct($id);
return $afficherOnePro;
}
}
}
$Products = new selectOne();
$productUpdat = $Products->selectOneProduct();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<title>Document</title>
</head>
<body>
<form method="POST" action="./UpdateProductLogic.php" >
<!-- Email input -->
<center>
<?php foreach($productUpdat as $elements):?>
<div class="form-outline mb-4">
<input type="text" id="form1Example2" class="form-control" value="<?php echo $elements['name'] ?>" name="Name" style="width: 400px;" />
<label class="form-label" for="form1Example2">name</label>
</div>
<div class="form-outline mb-4">
<input type="number" id="form1Example2" class="form-control" value="<?php echo $elements['prix'] ;?>" name="prix" style="width: 400px;" />
<label class="form-label" for="form1Example2">prix</label>
</div>
<div class="form-outline mb-4">
<input type="text" id="form1Example2" class="form-control" value="<?php echo $elements['quantite'] ;?>" name="qauntite" style="width: 400px;" />
<label class="form-label" for="form1Example2" >quentite</label>
</div>
<input type="hidden" id="form1Example2" class="form-control" value="<?php echo $elements['id'] ;?>" name="id" style="width: 400px;" />
<?php endforeach;?>
<button type="submit" name="submit">updat</button>
</center>
</form>
</body>
</html>