-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
38 lines (36 loc) · 818 Bytes
/
search.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
<?php
session_start();
include("includes/connect.php");
include("includes/functions.php");
function search()
{
$x=$_GET['category'];
$key=$_GET['keywords'];
$cat="";
if($x>-1)
$cat="AND category='$x'";
$sqlS="SELECT `item_number`, `title`,`subtitle`,`price`, icon FROM `items_available` WHERE MATCH(`title`,`subtitle`,`description`) AGAINST('$key') $cat";
display_items($sqlS);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Therade</title>
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/form.css"/>
<link rel="stylesheet" href="css/index.css"/>
</head>
<body>
<div id="wrapper">
<?php
headerSearch();
?>
<aside id="main_aside">
<?php side_cat(); ?>
</aside>
<section id="main_section">
<?php search();?>
</section>
</body>
</html>