-
Notifications
You must be signed in to change notification settings - Fork 0
/
shirt.php
56 lines (50 loc) · 1.76 KB
/
shirt.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
<?php include("inc/products.php");
if (isset($_GET["id"])) {
$product_id = $_GET["id"];
if (isset($products[$product_id])) {
$product = $products[$product_id];
}
}
if (!isset($product)) {
header("Location: shirts.php");
exit();
}
$section = "shirts";
$pageTitle = $product["name"];
include("inc/header.php"); ?>
<div class="section shirt page">
<div class="wrapper">
<div class="breadcrumb"><a href="shirts.php">Shirts</a> > <?php echo $product["name"]; ?></div>
<div class="shirt-picture">
<span>
<img src="<?php echo $product["img"]; ?>" alt="<?php echo $product["name"]; ?>">
</span>
</div>
<div class="shirt-details">
<h1><span class="price">$<?php echo $product["price"]; ?></span> <?php echo $product["name"]; ?></h1>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="<?php echo $product["paypal"]; ?>">
<input type="hidden" name="item_name" value="<?php echo $product["name"]; ?>">
<table>
<tr>
<th>
<input type="hidden" name="on0" value="Size">
<label for="os0">Size</label>
</th>
<td>
<select name="os0" id="os0">
<?php foreach($product["sizes"] as $size) { ?>
<option value="<?php echo $size; ?>"><?php echo $size; ?> </option>
<?php } ?>
</select>
</td>
</tr>
</table>
<input type="submit" value="Add to Cart" name="submit">
</form>
<p class="note-designer">* All shirts are designed by Sweet Tees From the 80’s</p>
</div><!-- .shirt-details -->
</div><!-- .wrapper -->
</div><!-- .section page -->
<?php include("inc/footer.php"); ?>