-
Notifications
You must be signed in to change notification settings - Fork 0
/
results - Copy.php
executable file
·129 lines (89 loc) · 3.25 KB
/
results - Copy.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE>
<?php
include("functions/functions.php");
?>
<html>
<head>
<title>MY online store</title>
<link rel="stylesheet" href="style.css" media="all">
</head>
<body>
<!--main wrapper starts-->
<div class="main_wrapper">
<!--header wrapper starts-->
<div class="header_wrapper">
<img id="logo" src="images\logo.png">
<img id="banner" src="images\banner2.jpg">
</div>
<!--header wrapper ends-->
<!--menubar starts-->
<div class="menubar">
<ul id="menu">
<li><a href="index.php">Home</a><li>
<li><a href="allproducts.php">All Products</a><li>
<li><a href="#">My Account</a><li>
<li><a href="#">Sign Up</a><li>
<li><a href="cart.php">Shopping Cart</a><li>
<li><a href="#">Contact Us</a><li>
</ul>
<div id="form">
<form method="get" action="results.php" enctype="multipart/form-data">
<input id="text" type="text" placeholder="search item" name="user_query">
<input id="search" type="submit" value="Search" name="search">
</form>
</div>
</div>
<!--menubar ends-->
<!--content wrapper starts-->
<div class="content_wrapper">
<div id="sidebar">
<div id="sidebar-title">CATEGORIES</div>
<ul id="cats">
<?php getcats(); ?>
</ul>
<div id="sidebar-title">AUTHOR</div>
<ul id="cats">
<?php getauthor(); ?>
</ul>
</div>
<div id="content_area">
<div id="shopping_cart">
<span style="float:right;font-size:18px;padding:5px;line-height:35px;">
Welcome Guest! <b style="color:yellow">Shopping Cart- </b>Total Items: Total Price: <a href="cart.php" style="color:red;text-decoration:none">Go to Cart</a>
</span>
</div>
<div id='products_box'>
<?php
if(isset($_GET['search']))
{
$search = $_GET['user_query'];
$get_pro = "select * from products where p_keywords like '%$search%' ";
$run_pro = mysqli_query($con,$get_pro);
while($row_pro = mysqli_fetch_array($run_pro)){
$pro_id = $row_pro['p_id'];
$pro_cat = $row_pro['p_category'];
$pro_price = $row_pro['p_price'];
$pro_author = $row_pro['p_author'];
$pro_image = $row_pro['p_image'];
$pro_title = $row_pro['p_title'];
echo "
<div id='single_product'>
<h3 id='title'>$pro_title</h3>
<img src='admin_area/product_images/$pro_image' width='230' height='230'>
<p id='title1'><b>$ $pro_price</b></p>
<a href='details.php?pro_id=$pro_id' id= 'details' style='text-decoration:none;float:left;font-size:18px'>Details</a>
<a href='index.php?pro_id=$pro_id'><button style='float:right'>Add to cart</button></a>
</div>
";
}
}
?>
</div>
</div>
</div>
<!--content wrapper ends-->
<div id="footer"><h2>©2017 by www.shopnix.com</h2></div>
</div>
<!--main wrapper ends-->
</body>
</html>