-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatc.html
68 lines (59 loc) · 1.68 KB
/
atc.html
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
<?php
session_start();
require_once("registration/config.php");
require_once("cart.php");
/* Get post information */
$id = intval($_POST['vehID']);
$vehicle = "SELECT id, name, type, price, seats, transmission, img FROM inventory WHERE id={$id}";
if ($stmt_veh = mysqli_prepare($link, $vehicle)) {
mysqli_stmt_execute($stmt_veh);
mysqli_stmt_bind_result($stmt_veh, $id_2, $name, $type, $price, $seats, $transmission, $img);
mysqli_stmt_fetch($stmt_veh);
mysqli_stmt_close($stmt_veh);
} else {
die("ERROR: " . mysqli_error($link));
}
/* Get current city */
$city = "";
if(!isset($_SESSION['city'])){
/* default to Atlanta */
$city = "atlanta";
} else {
$city = $_SESSION['city'];
}
/* Add car to cart */
cart_add($id);
?>
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Rental Reservation Added!</title>
<link href="checkout.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="checkout-card">
<div class="title">
<p><span>Rental Reservation Added!</span> <br>
<?php echo $name; ?>
</p>
</div>
<div class="price-container">
<div class="price-card">
<img src="<?php echo $img; ?>" alt="car1">
</div>
</div>
<div class="detail-info">
<div class="info">
<h3>Price per day only $<?php echo $price; ?>!</h3>
<small>*Subject to additional taxes and fees</small>
</div>
<form action="<?php echo $city; ?>.html" id="return">
<button class="btn">Return</button>
</form>
</div>
</div>
</div>
</body>
</html>