-
Notifications
You must be signed in to change notification settings - Fork 0
/
place_order.php
33 lines (26 loc) · 894 Bytes
/
place_order.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
<?php
session_start();
// include classes
include_once "config/database.php";
include_once "objects/cart_item.php";
// get database connection
$database = new Database();
$db = $database->getConnection();
// initialize objects
$cart_item = new CartItem($db);
// remove all cart item by user, from database
$cart_item->user_id=$_SESSION['user_id']; // we default to '1' because we do not have logged in user
$cart_item->deleteByUser();
// set page title
$page_title="Thank You!";
// include page header HTML
include_once 'layout_head.php';
echo "<div class='col-md-12'>";
// tell the user order has been placed
echo "<div class='alert alert-success'>";
echo "<strong>Your order has been placed!</strong> Thank you very much!";
echo "</div>";
echo "</div>";
// include page footer HTML
include_once 'layout_foot.php';
?>