%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_93b53270/ |
Upload File : |
<?php include('header.php');
if (!isset($_SESSION['cart'])) {
echo "<script>window.location='".$base_url."products.php'</script>";
}
?>
<section class="checkout mt-30 mb-30">
<form method="POST" action="">
<div class="container-fluid">
<div class="row">
<?php if(isset($_SESSION['order_error'])){
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert">
<i class="feather icon-alert-triangle text-danger"></i> <strong class="text-dark">'.$_SESSION['order_error'].'</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
</button>
</div>';
}
unset($_SESSION['order_error']);
?>
<div class="col-md-8">
<div class="box-subtotal">
<h3>Please fill in all mandatory fields.</h3>
<div class="row">
<div class="col-md-6">
<input type="text" name="fname" class="form-control mb-3" placeholder="First Name" required>
</div>
<div class="col-md-6">
<input type="text" name="lname" class="form-control mb-3" placeholder="Last Name" required>
</div>
<div class="col-md-6">
<input type="email" name="email" class="form-control mb-3" placeholder="Email id" required>
</div>
<div class="col-md-6">
<input type="tel" id="phone" name="phone" class="form-control mb-3" placeholder="Phone No" pattern="\d{10}" title="Please enter exactly 10 number" required>
</div>
<div class="col-md-4">
<input type="text" name="country" class="form-control mb-3" placeholder="Country" required>
</div>
<div class="col-md-4">
<input type="text" name="state" class="form-control mb-3" placeholder="State" required>
</div>
<div class="col-md-4">
<input type="text" name="city" class="form-control mb-3" placeholder="City">
</div>
<div class="col-md-6">
<textarea name="address" class="form-control mb-3" rows="4" placeholder="Address" required></textarea>
</div>
<div class="col-md-6">
<input type="number" name="postcode" class="form-control mb-3" placeholder="Zip Code" required>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="box-subtotal">
<div class="table-responsive">
<table class="table table-bordered bg-white">
<thead>
<tr>
<th>Product Name</th>
<th>Price</th>
<th>Quantity</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
<?php
$total_sum_usd1 = 0;
foreach ($_SESSION['cart'] as $productId => $quantity) {
$fetch_row = mysqli_fetch_assoc(mysqli_query($conn,"SELECT * FROM product_tbl WHERE id='$productId'"));
$usd_dsc_price = $fetch_row['price'];
$product_id = $fetch_row['id'];
$subtotal_usd = $quantity * $usd_dsc_price;
$total_sum_usd1 += $subtotal_usd;
$grndTotalUsd = $total_sum_usd1;
?>
<tr>
<td><?=$fetch_row['title']?></td>
<td>AED <?=$usd_dsc_price?></td>
<td class="qunt text-center">
<?=$quantity?>
</td>
<td>AED <?=$subtotal_usd?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-8 mt-3">
<div>
<p></p>
</div>
</div>
<div class="col-md-4 mt-3">
<div class="box-subtotal">
<div class="d-flex justify-content-between">
<div>
Subtotal
</div>
<div>
AED <?=$total_sum_usd1?>
</div>
</div>
<div class="d-flex justify-content-between">
<div>
Your Pay
</div>
<div>
AED <?=$grndTotalUsd?>
</div>
</div>
<input type="submit" name="order_place" class="btn-theme w-100 mt-3 text-center" value="Pay Now">
</div>
</div>
</div>
</div>
</form>
</section>
<?php include('footer.php'); ?>