-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchPage.html
More file actions
33 lines (33 loc) · 806 Bytes
/
SearchPage.html
File metadata and controls
33 lines (33 loc) · 806 Bytes
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
<html>
<body>
<h2>Search item by color:</h2>
<BR>
<form action="ClothingInsert.php" method="post">
color: <input type="text" name="color" value='<?php echo htmlentities($color) ?>'>
<input type="Submit">
</form>
<?php
if(isset($_POST['Submit'])) {
$color = filter_input(INPUT_POST, "color");
$sql = $mysqli->prepare("SELECT clothingID FROM clothing WHERE color='$color'");
$sql->execute();
$sql->store_result();
$sql->bind_result($clothingID);
$sql->fetch();
?>
<BR>
<h2>Search item by size:</h2>
<BR>
<form action="DressesInsert.php" method="post">
size: <input type="text" name="Size">
<input type="Submit">
</form>
<BR>
<h2>Search item by brand:</h2>
<BR>
<form action="DressesInsert.php" method="post">
size: <input type="text" name="brand">
<input type="Submit">
</form>
</body>
</html>