-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
49 lines (49 loc) · 1.74 KB
/
header.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
<div class="container-fluid">
<div class="row">
<div class="col topheader">
<span>
<p><?php echo date("l jS F Y h:i:s A"); ?></p>
</span>
<span>
<a href="#">About Us</a>
<a href="#">Contact Us</a>
</span>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col header">
<h2 onclick="location.href='index.php'" >BlogCMS</h2>
<img src="admin/images/headerlogo.jpg" onclick="location.href='index.php'" class="bimg">
<span>
<form action="search.php" method="POST">
<input type="text" name="search" id="search" placeholder="Search..." autocomplete="off">
<input type="submit" name="searchsub" value="Search">
</form>
</span>
</div>
</div>
<div class="row">
<div class="col">
<div class="navbar">
<?php
require_once('database/connection.php');
$sql="SELECT category_id,category_name FROM category";
$res=$conn->prepare($sql);
$res->bind_result($id,$catname);
$res->execute();
$res->store_result();
if($res->num_rows()>0){
?>
<ul>
<li onclick="location.href='index.php'">Home</li>
<?php while($res->fetch()){ ?>
<li onclick="location.href='category.php?pageid=<?php echo $id; ?>'"><?php echo $catname; ?></li>
<?php }?>
</ul>
<?php } ?>
</div>
</div>
</div>
</div>