-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuccess.php
More file actions
46 lines (40 loc) · 1.65 KB
/
success.php
File metadata and controls
46 lines (40 loc) · 1.65 KB
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
<?php
require('includes/common.php');
if (!isset($_SESSION['email'])) {
header('location: index.php');
}
$user_id = $_SESSION['user_id'];
$item_ids_string = $_GET['pid'];
//We will change the status of the items purchased by the user to 'Confirmed'
$query = "UPDATE users_items SET status='Confirmed' WHERE user_id=" . $user_id . " AND item_id IN (" . $item_ids_string . ") and status='Added to cart'";
mysqli_query($con, $query) or die($mysqli_error($con));
?>
<!DOCTYPE html>
<html>
<head>
<title>Success | Life Style Store</title>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="icon" type="image/png" href="images/logo.png">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css" >
<script src="bootstrap/js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<?php
include('includes/header.php')
?>
<div class="container-fluid" id="content">
<div class="col-md-12 con">
<div class="jumbotron" style="background-color:#D3D3D3">
<center>
<h3 style="font-weight: bold;">Your order is confirmed. Thank you for shopping with us.</h3><hr>
<p style="font-weight: bold;">Click <a href="products.php">here</a> to purchase any other item.</p>
</center>
</div>
</div>
</div>
<?php
include('includes/footer.php');
?>
</body>
</html>