Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/agriba/includes/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include'db-conn.inc.php'; if(isset($_SESSION['rand'])) { $cartkey = $_SESSION['rand']; // echo "<script>alert($cartkey);</script>"; } else { if(isset($_SESSION['customer_phone'])) { $customerid = $_SESSION['customer_id']; $sqls=mysqli_query($conn,"select * from tbl_order where customer_id='$customerid' and cart_status='0' ") or die(mysqli_query($conn)); $rows =mysqli_fetch_assoc($sqls); $cartkey = $rows['order_id']; } else{ $cartkey = "0"; } } $total=0; $sqlc=mysqli_query($conn,"select * from tbl_order_details where order_id='$cartkey'") or die(mysqli_query($conn)); $totalValue = mysqli_num_rows($sqlc); while($rowss =mysqli_fetch_assoc($sqlc)) { $total += ($rowss['price'] * $rowss['quanitity']); } ?> <i class="fas fa-shopping-basket"></i><sup><?php echo $totalValue; ?></sup><span>Total Price<small > ₹ <?php echo $total;?></small></span>