-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchResults.php
61 lines (41 loc) · 1.56 KB
/
searchResults.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
<?php
include 'stylesheets.php';
include 'nav.php';
?>
<head><link rel="stylesheet" href="search.css"> </head>
<div id = "container">
<div id = "headerBar">
<h2 id = "headerTitle">Search Results</h2>
</div>
<?php
if(isset($_SESSION['searchResults']) && count($_SESSION['searchResults'])){
foreach ($_SESSION['searchResults'] as $result){
echo
'<form method = "post" action = "ATC_handler.php">
<div id = "search-row">
<div id = "inner-search">
<div id = "image" >
<img src = "'.$result['imageSrc'].'" class ="image-pic"></img>
</div>
<div id = "info">
<div id = "title">
<h2 class = "product">'.$result['partName'].'</h2>
</div>
<div id = "desc">'.$result['partDesc'].'</div>
<div id = "price">$'.$result['price'].'</div>
</div>
<input type = "hidden" name = "id" value = "'.$result['partID'].'"></input>
<div id = "center">
<button id = "button" type = "submit">Add to Cart</button>
</div>
</div>
</div>
</form>
<hr></hr>';
}
}
else{
echo '<h2 class = "none">No search results</h2>';
}
?>
</div>