-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkout.php
61 lines (61 loc) · 2.42 KB
/
checkout.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
<!-- login -->
<?php
include('header.php');
$select_opt1=['email'=>$_COOKIE['userid']];
$rsedit=$obj->select('users',$select_opt1);
?>
<div class="address py-5" id="contact">
<div class="container py-xl-5 py-lg-3">
<div class="title text-center mb-5">
<h3 class="mb-2">Duncho | confirm address</h3>
</div>
<div class="row">
<div class="col-lg-6 mx-auto mt-lg-0 mt-5">
<div class="address-grid">
<p class="text-center">Total Cost: $ <?php $sql =$con->prepare("SELECT sum(price) as total FROM `cart_items` ");
$sql->execute();
$result=$sql->get_result();
while ($row =$result->fetch_assoc())
{
echo number_format($row['total']);
} ?></p>
<p class="text-center">Total Items: <?php
$email=$_COOKIE['userid'];
$query=$con->query("SELECT * FROM `cart_items` WHERE email='$email'"); echo $query->num_rows;?></p>
<p class="text-center">Physical adress: <?php echo $rsedit[0]['address'] ?></p>
<p class="text-center">Email adress: <?php echo $rsedit[0]['email'] ?></p>
<p class="text-center">Phone number: <?php echo $rsedit[0]['phone'] ?></p>
<p class="text-center">Helpline: <a href="tel:<?php echo $user['phone'] ?>"><?php echo $user['phone'] ?></a></p>
<form class="mt-3">
<select class="form-control" name="gender" required="">
<option value="sample pickup location one">sample pickup location one</option>
<option value="sample pickup location two">sample pickup location two</option>
<option value="sample pickup location three">sample pickup location three</option>
</select>
<div class="text-center mt-3">
<a href="finish.php" class="btn btn-info btn-block">
<span class="fa fa-spinner fa-spin profile_spinner" style="display:none"></span>
<span class="profile_text">Finish</span>
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function()
{
if(localStorage.userid ==='' || localStorage.userid ===undefined)
{
window.location='login.php';
}
else
{
$('.logged_in,.home-links').removeClass('d-none');
$('.removecart_btn,.checkotbtn').attr('disabled',false);
}
});
</script>
<?php include('footer.php') ?>