-
Notifications
You must be signed in to change notification settings - Fork 0
/
productDetails.php
154 lines (143 loc) · 6.25 KB
/
productDetails.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
include("include/connect.php");
$pid = $_GET['id'];
$query = "select * from category";
$results1 = mysqli_query($conn, $query) or die("Cannot connect");
/*$query1 = "select * from product";
$results2 = mysqli_query($conn,$query1) or die("Cannot connect");*/
$query3 = "select * from product WHERE id= '$pid'";
$results3 = mysqli_query($conn, $query3);
?>
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="components/dropdown.min.css">
</head>
<body>
<?php
include ('header.php');
?>
<!---- content box--->
<div class="ui main container">
<div class="ui grid">
<div class="three wide column">
<div class="ui vertical menu">
<a class="item">
<div class="header"><h3>Products Categories</h3></div>
</a>
<?php
while ($row = mysqli_fetch_assoc($results1))
{
?>
<a class="item" href="categoryDetails.php?id=<?php echo $row['id']; ?>" > <?php echo strtoupper($row['name']); ?> </a>
<?php } ?>
</div>
</div>
<div class="thirteen wide column">
<h3 style="align-self: flex-start">Product Information</h3>
<?php
while ($row = mysqli_fetch_assoc($results3))
{
?>
<div class="ui info message">
<div class="ui items">
<div class="item">
<div class="image">
<img src='product_images/<?php echo $row["prod_image"]?>' width="100%" height="100%">
</div>
<div class="content">
<a class="header"><h1><?php echo $row["name"];?></h1></a>
<div class="description">
Description : <?php echo $row["description"];?> <br>
<div class="ui inverted section divider"></div>
Price : Rs <?php echo $row["price"];?>
<div class="ui inverted section divider"></div>
Discount : Rs <?php echo $row["discount"];?>
<div class="ui inverted section divider"></div>
<form action="addCart.php?id=<?php echo $row['id']?>" method="post">
<strong>Quantity :</strong>
<select name="qty" id="cart-no" class="dropdown selection">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<strong><?php echo $row["stock"];?> items in stock </strong>
<button type="submit" name="submit" style="float: right;" class="ui animated fade youtube button" tabindex="0">
<div class="visible content">Add to Cart</div>
<div class="hidden content">
<i class="shop icon"></i>
</div>
</button>
</form>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!----- footer------>
<footer style="position: absolute; ">
<div class="ui inverted vertical footer segment" style="margin-top: 14px;">
<div class="ui center aligned container">
<div class="ui stackable inverted divided grid">
<div class="four wide column">
<h4 class="ui inverted header">ACCOUNT</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">INFORMATION</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">OFFERS</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">SOCIAL MEDIA</h4>
<button class="ui circular facebook icon button">
<i class="facebook icon"></i>
</button>
<button class="ui circular twitter icon button">
<i class="twitter icon"></i>
</button>
<button class="ui circular linkedin icon button">
<i class="linkedin icon"></i>
</button>
<button class="ui circular google plus icon button">
<i class="google plus icon"></i>
</button>
<p class="pull-right">© msbomrel</p>
</div>
</div>
<div class="ui inverted section divider"></div>
<div class="ui horizontal inverted small divided link list">
<a class="item" href="#">Site Map</a>
<a class="item" href="#">Contact Us</a>
<a class="item" href="#">Terms and Conditions</a>
<a class="item" href="#">Privacy Policy</a>
</div>
</div>
</div>
</footer>
<script>
$('#cart-no').dropdown();
</script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="js/semantic.min.js"></script>
<script src="components/dropdown.min.js"></script>
</body>
</html>