Repository navigation
Expand file tree
/
Copy pathprediction.php
More file actions
executable file
·38 lines (37 loc) · 1.64 KB
/
Copy pathprediction.php
File metadata and controls
executable file
·38 lines (37 loc) · 1.64 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 "dbconfig.php";
if (isset($_POST['key'])){
$key = $_POST['key'];
$res = $mysqli->query("SELECT * FROM menu WHERE Name LIKE '%$key%'");
$html = '';
while ($row = $res->fetch_assoc()){
$type = explode(' ',$row['category']);
if ($type[0] == "Veg")
$sym = "images/indian-vegetarian-mark-90.png";
else
$sym = "images/non-veg-symbol.png";
$html .= <<<EOT
<div class="col-md-2"></div>
<div class="col-md-4 col-xs-12 card">
<div class="row">
<img src="{$row['img_src']}" class="img-responsive menu-img"/>
</div>
<div class="row">
<div class="col-md-6 col-xs-9">
<h2 class="itemHeading">{$row['Name']} <img src="{$sym}" style="width: 20px;height: 20px"/></h2>
<p class="itemDes">{$row['description']}</p>
<h4 class="pricing">{$row['cost']}₹</h4><br>
</div>
<div class="col-md-6 col-xs-3">
<div class="btn-group" value="{$row['item_id']}">
<button class="btn btn-quantity"><i class="material-icons">remove_circle_outline</i></button>
<button class="btn btn-quantity"><span id="quantity"> 0</span></button>
<button class="btn btn-quantity"><i class="material-icons">add_circle_outline</i></button>
</div>
</div>
</div>
</div>
EOT;
}
echo $html;
}