AdvancedSearch.php 1.03 KB
Newer Older
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
1
2
3
4
5
6
<!DOCTYPE html>
<html>
<head>
    <title>Drinkpedia</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/AdvancedSearch.css">
7
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
8
    <script type = "text/javascript" src="scripts/DataQuery.js"></script>  
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
9
10
11
</head>

<body>
12
13
14
15
16
17
    <form autocomplete="off">
        <div class="autocomplete" style="width:300px;">
            <h2>Rechercher un aliment : </h2>
            <input id="myInput" autocomplete="off" type="text" name="myIngredient" placeholder="Ingrédient">
        </div>
    </form>
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
18

19
20
    <script src="scripts/DataQuery.js"></script>
    <script src="scripts/Functions.js"></script>
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
21
22
    <script>

23
24
25
        let allIngredients = [<?php include 'scripts/Functions.php'; $first = true; foreach(getAllIngredients() as $ingredient) { if(!$first) echo ','; else $first = false; echo '"' . $ingredient . '"'; } ?>];
        autocomplete(document.getElementById("myInput"), allIngredients);
        
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
26
    </script>
ALGLAVE Ivan's avatar
ALGLAVE Ivan committed
27
28
29
</body>

</html>