-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer-confirmation.php
103 lines (74 loc) · 3.13 KB
/
customer-confirmation.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
<?php
session_start();
require_once('connDB.php');
if ($conn === false) {
die("ERROR: Could not connect. " . mysqli_connect_error());
}
if ($_SESSION['userType'] != 1) {
header("Location: home.php");
}
$userType = $_SESSION['userType'];
if (!isset($_SESSION['username'])) {
header("Location: welcome.html");
exit();
} else {
$username = $_SESSION['username'];
$userType = $_SESSION['userType'];
}
// $help = "SELECT * FROM orders WHERE username = '$username'";
// $res = $conn->query($help);
// $val = mysqli_fetch_array($res);
// $firstName = $val['firstName'];
// $confirmationID = $val['confirmation_id'];
// $orderID = $val['order_id'];
// $orderDate = $val['day_ordered'];
// $okay = "SELECT * FROM orders WHERE order_id= '$orderID';";
// $p = $conn->query($okay);
// $length = mysqli_num_rows($p);
// $order = array_fill(0, $length, NULL);
// $items = array_fill(0, $length, NULL);
// $i = 0;
// while ($row = mysqli_fetch_array($p)) {
// $order[$i] = $row;
// $i++;
// }
// $quantity = 0;
// foreach ($order as $o) {
// $quantity = $quantity + $o['quantity'];
// }
// $total = $quantity*$val['price'];
// $completeAdd = '' . $val['street'] . ', ' . $val['city'] . ' ' . $val['state'] . ' ' . $val['zip'];
// echo $completeAdd;
?>
<!DOCTYPE>
<head>
<link href="customer-confirmation.css" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<title>LittyLit</title>
<link href='https://fonts.googleapis.com/css?family=Nunito:400,700,400italic,700italic' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Girassol:400,700,400italic,700italic' rel='stylesheet'>
</head>
<body>
<main>
<?php include 'elements/header.php' ?>
<div class="row justify-content-center">
<div class="col-sm-8" style="background: #C8D8E4; margin: 10%; border-radius: 25px; padding: 3%; box-shadow: 2px 5px 15px #6B7379">
<div class="row justify-content-center">
<div class="col-sm-8 m-2">
<h2 style="font-family: Nunito; text-align: center; color: #3F3D56"><strong>Thank you for shopping with <span style="font-family: Girassol; font-size: 100%">LittyLit</span></strong></h2>
</div>
</div>
<div class="row justify-content-center">
<div class="col-sm-8 m-2">
<h4 style="font-family: Nunito; text-align: center; color: #3F3D56">Your order was successfully completed! Check your email inbox for your order information.</h4>
</div>
</div>
<div class="row pt-5 justify-content-center">
<div class="col-sm-8 text-center">
<button style="background-color: #2B6777; border: 5px solid #2B6777; box-shadow: 5px 5px 15px #6B7379;" class="btn btn-primary px-3"><a href="home.php" style="font-family: Nunito; font-size: 130%; color: #ffffff">Return to Home Page</a></button>
</div>
</div>
</div>
</div>
</main>
</body>