Repository navigation
Expand file tree
/
Copy pathedit.php
More file actions
38 lines (33 loc) · 1.37 KB
/
Copy pathedit.php
File metadata and controls
38 lines (33 loc) · 1.37 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
<?php include "inc/header.php" ?>
<?php
$id = $_POST['id'];
$Products = getProducts();
foreach($Products as $product){
if($product['id'] == $id){
$p =$product;
}
}
?>
<form action="handlers/product/update.php" method="POST">
<input type="hidden" id="id" name="id" class="form-control" value="<?= $p['id'] ?>">
<div class="mb-3">
<label for="name" class="form-label">Name:</label>
<input type="text" id="name" name="name" class="form-control" value="<?= $p['name'] ?>">
</div>
<div class="mb-3">
<label for="description" class="form-label">Description:</label>
<input type="text" id="description" name="description" class="form-control" value="<?= $p['description'] ?>">
</div>
<div class="mb-3">
<label for="price" class="form-label">Price:</label>
<input type="number" id="price" name="price" class="form-control" value="<?= $p['price'] ?>">
</div>
<div class="mb-3">
<label for="files">Upload Files:</label><br>
<input type="file" id="files" name="image" multiple><br><br>
<input type="hidden" name="current_image" value="<?= $p['image'] ?>">
</div>
<button type="submit" class="btn btn-success">Update</button>
</form>
<link href="../css/styles.css" rel="stylesheet" />
<?php require_once "inc/footer.php"; ?>