-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_result.php
executable file
·103 lines (84 loc) · 2.25 KB
/
search_result.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
require('includes/config.php');
session_start();
$search=$_GET['s'];
$query="select *from book where b_nm like '%$search%'";
$res=mysqli_query($conn,$query) or die("Can't Execute Query...");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include("includes/head.inc.php");
?>
</head>
<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php
include("includes/menu.inc.php");
?>
</div>
</div>
<div id="logo-wrap">
<div id="logo">
<?php
include("includes/logo.inc.php");
?>
</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<h1 class="title"><?php echo @$_GET['cat'];?></h1>
<div class="entry">
<table border="3" width="100%" >
<?php
$count=0;
while($row=mysqli_fetch_assoc($res))
{
if($count==0)
{
echo '<tr>';
}
echo '<td valign="top" width="20%" align="center">
<a href="detail.php?id='.$row['b_id'].'">
<img src="'.$row['b_img'].'" width="80" height="100">
<br>'.$row['b_nm'].'</a>
</td>';
$count++;
if($count==4)
{
echo '</tr>';
$count=0;
}
}
?>
</table>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebar -->
<div id="sidebar">
<?php
include("includes/search.inc.php");
?>
</div>
<!-- end sidebar -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
<?php
include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>