-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
86 lines (81 loc) · 3.58 KB
/
Copy pathsearch.php
File metadata and controls
86 lines (81 loc) · 3.58 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
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
<?php
session_start();
if(isset($_POST['register'])){
require "dbconnect/connect_to_books.php";
$pageTitle = $q;
}
?>
<!DOCTYPE html>
<html>
<?php include("includes/head.php");?>
<body>
<?php include("includes/header.php");?>
<?php include("includes/signup.php") ?>
<div class="row">
<div class="col-lg-3 col-3 mx auto m-3" style="border-right : 2px solid grey; border-bottom : 2px solid grey";>
<div class="container">
<h2>Filters</h2>
<form action="search.php" method="post">
<ul>
<li><a id="price_but" href="#" class="btn btn-info" role="button">Price</a></li>
<section class="range-slider" id="facet-price-range-slider">
<input name="range-1" value="0" min="0" max="2000" step="1" type="range">
<input name="range-2" value="2000" min="0" max="2000" step="1" type="range">
</section>
<div id="price" style="display:none">
<input type="number" name="min" placeholder="Min Value" value="" />
<input type="number" name="max" placeholder="Max Value" value=""/>
</div>
<li><a id="type_but" href="#" class="btn btn-info" role="button">Type</a></li>
<div id="btype" style="display:none">
<div>
<input type="checkbox" name="rent" value="rent" />Rent
<input class="buy" type="checkbox" name="buy" value="buy" onchange="type()" />Buy
</div>
<div class="buy_res">
<input type="checkbox" name="new" value="new" />New
<input type="checkbox" name="sh" value="second hand" />Second Hand
</div>
</div>
<li><a id="city_but" href="#" class="btn btn-info" role="button">City</a></li>
<div id="city" style="display:none">
<select class="" name="city" placeholder="City">
<option value="" selected disabled hidden>Choose City</option>
<option value="NIT Agartala" style="color:black">Mumbai</option>
<option value="NIT Allahabad" style="color:black">Nagpur</option>
</select>
<input type="submit" name="price_range" />
</div>
<li><a id="sort_but" href="#" class="btn btn-info" role="button">Sort Books</a></li>
<div id="sort" style="display:none">
<button name="newest" value="">Newest First</button>
<button name="oldest" value="">Oldest FIrst</button>
</div>
</ul>
</form>
</div>
</div>
<div id="feed" class="col-lg-8 col-8 mx auto m-3">
<div id="wrap">
<div id="columns" class="columns_4">
<?php
require "dbconnect/connect_to_books.php";
$query = "SELECT * FROM Books LIMIT 40";
$result = mysqli_query($con_books,$query);
while($row = mysqli_fetch_array($result)){
?>
<figure>
<a href="product.php?Book_ID=<?php echo $row['Book_ID']; ?>" class="cover">
<img src="img/<?php echo $row['Book_ID']; ?>.jpg" />
</a>
<span class="price">₹<?php echo $row['Selling_[Price]'] ?></span>
<a class="button" name="submit" href="product.php?Book_ID=<?php echo $row['Book_ID']; ?>">Order Now</a>
</figure>
<?php } ?>
</div>
</div>
</div>
</div>
<?php include("includes/footer.php"); ?>
</body>
</html>