-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.php
99 lines (92 loc) · 4.07 KB
/
product.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
<?php include("header.php"); ?>
<?php include("connection.php"); ?>
<div class="sizefull flex product-container scrolly">
<?php
$pid=$_GET['pid'];
$sql="SELECT * FROM product where pid=$pid";
$result=mysqli_query($conn,$sql);
while($rows=mysqli_fetch_array($result)){?>
<div class="sizefull product flex flex-col " >
<div>
<img alt="Product Image Unavailable" src="<?php echo $rows['img'];?>" class="product-img">
</div>
<div class="product-title text-center">
Title: <?php echo $rows['name'];?>
</div>
<div class="product-material text-center">
Material: <?php echo $rows['material']?>
</div>
<div class="text-center">
Category: <?php echo $rows['category']?>
</div>
<div class="product-title text-left">
Description
</div>
<div class="text-left">
<?php echo $rows['description']?>
</div>
<div>
<!-- <img alt="chart unavailable" src="
<?php// echo $rows['chart'];
?>
" > -->
</div>
</div>
<div class="flex sizefull product-right" >
<form action="newrequest.php" method="post" class="widthfull">
<input type="hidden" name="pid" value="<?php echo $rows['pid'];?>">
<table class="widthfull">
<tr>
<th>Custom Request</th>
</tr>
<?php
if(!verifysession()){
?>
<tr>
<td>
You need to <a class="linktext" href="login.php">login</a> to Send custom requests
</td>
</tr>
<?php
}else{
?>
<tr>
<td>Size</td>
<td><input type="text" name="size" id="size" ></td>
</tr>
<tr>
<td>material</td>
<td><input type="text" name="material" id="material" placeholder="<?php echo $rows['material'];?>"></td>
</tr>
<tr>
<td>Note (optional)</td>
<td>
<textarea name="note" id="note" cols="16" rows="5"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Send Request">
</td>
</tr>
<?php
}
?>
</table>
</form>
</div>
<?php
}?>
</div>
<?php
if(isset($_GET["redirect"])){
if($_GET["redirect"] == "requestsuccess"){
?>
<script>
window.alert("Your request has been noted ,we will get in contact with you soon");
</script>
<?php
}
}
?>
<?php include("footer.php"); ?>