-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_ingredient.php
68 lines (58 loc) · 2.79 KB
/
add_ingredient.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
session_start();
require 'conf.inc.php';
require 'functions.php';
include 'header.php';
$pdo = connectDB();
$queryPrepared = $pdo->prepare("SELECT ingredientName, ingredientImage, ingredientCategory, idIngredient FROM INGREDIENTS");
$queryPrepared->execute();
$result = $queryPrepared->fetchAll(PDO::FETCH_ASSOC);
?>
<h1>Ajou</h1>
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#mymodal" data-whatever="@mdo">Open modal
for @mdo
</button>
<div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ajouter un ingrédient</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="col-form-label">Nom de l'aliment:</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Catégorie de l'ingrédient</label>
<select class="form-control" id="exampleFormControlSelect1">
<option>Fruit</option>
<option>Légume</option>
<option>Boisson</option>
<option>Féculent</option>
<option>Céréales</option>
<option>Produit laitier</option>
<option>Viande, poisson, oeufs</option>
<option>Corps gras</option>
<option>Sucre</option>
</select>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" id="validatedCustomFile" required>
<label class="custom-file-label" for="validatedCustomFile">Choisir une image...</label>
<div class="invalid-feedback">Example invalid custom file feedback</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
<button type="button" class="btn btn-success">Ajouter</button>
</div>
</div>
</div>
</div>
<?php include "footer.php"; ?>