-
Notifications
You must be signed in to change notification settings - Fork 0
/
catagories.php
64 lines (50 loc) · 1.95 KB
/
catagories.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
<?php
require_once('database.php');
require_once('userpanel.php');
?>
<!-- CAtegories Section Starts Here -->
<section class="categories">
<div class="container">
<h2 class="text-center">Explore Foods</h2>
<?php
$sql = "SELECT * FROM catagory WHERE active='Yes'";
$res = mysqli_query($connect, $sql);
$count = mysqli_num_rows($res);
if($count>0)
{
while($row=mysqli_fetch_assoc($res))
{
$id = $row['catagory_id'];
$title = $row['title'];
$image_name = $row['image_name'];
?>
<a href="<?php echo "";?>catagories_food.php?catagory_id=<?php echo $id; ?>">
<div class="box-3 float-container">
<?php
if($image_name=="")
{
echo "Image not found.";
}
else
{
?>
<img src="<?php echo ""; ?>image/catagory/<?php echo $image_name; ?>" alt="Pizza" class="img-responsive img-curve">
<?php
}
?>
<h3 class="float-text text-white"><?php echo $title; ?></h3>
</div>
</a>
<?php
}
}
else
{
echo "Category not found.";
}
?>
<div class="clearfix"></div>
</div>
<?php
require_once('footers.php');
?>