-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheckout.view.php
102 lines (85 loc) · 4.67 KB
/
checkout.view.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
<!DOCTYPE html>
<html lang="en" class="h-full bg-white">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Active Wear Co</title>
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,line-clamp"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
clifford: "#da373d",
},
},
},
};
</script>
</head>
<body class="h-full">
<!-- navigation bar start -->
<?php include "navbar.php";?>
<!-- nav bar end -->
<!-- cart starts -->
<main class="container mx-auto my-auto h-screen ml-98 text-black">
<div class="flex flex-col justify-center">
<div class="col-span-2 p-5 ">
<div class="flex flex-col ml-5 text-center">
<h2 class="text-4xl font-bold ">Checkout Page</h2><br/>
</div>
<form class='bg-gray dark:bg-gray-800 shadow rounded py-16 flex flex-col justify-center items-center' action="./checkout.php" method="POST">
<?php
if(isset($_SESSION['fname'])){
echo' <h2 class="text-xl ml-4 my-4 my-2 text-black">Welcome <b>' . $_SESSION['fname'] . '</b> <span>Your Billing Address will be same as the address mention during signup</span></h2>
';
}
else{
echo' <label for="fname" class="block text-sm font-medium text-slate-100">
First Name</label>
<input type="text" name="fname" id="fname" class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="First Name" >
<label for="lname" class="block text-sm font-medium text-gray-100">
Last Name</label>
<input type="text" name="lname" id="lname" class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Last Name" >
<label for="email" class="block text-sm font-medium text-gray-100">
Email</label>
<input type="email" name="email" id="email" class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Email" >
<hr>';
}
?>
<h4 class="text-xl font-bold my-3 ml-4 text-black-50">Card Details</h4>
<div class="class w-1/2 flex flex-col justify-center ml-5">
<label for="card" class="my-2 block text-sm font-medium text-black">
Card Number</label>
<input type="text" name="card" id="card"
class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
placeholder="Card Number">
<label for="exp" class="my-2 block text-sm font-medium text-black">
Expiration Date</label>
<input type="text" name="exp" id="exp"
class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
placeholder="MM/YY">
<label for="cvv" class="my-2 block text-sm font-medium text-black">
CVV</label>
<input type="text" name="cvv" id="cvv"
class="mt-1 p-2 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
placeholder="CVV">
<div class="flex justify-center">
<a href="./cart.view.php" class="uppercase font-medium py-2 ml-4 mx-4 mt-8 text-sky-400">
back to cart
</a>
<button type="submit" name="submit"
class="uppercase font-medium py-2 bg-blue-500 text-white rounded px-2 py-2 mt-8">
Place order
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</main>
<!-- cart ends -->
<?php include "footer.php";?>
</body>
</html>