MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.226.200.93
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/.cphorde/../ppcadsexpert.com/../adisgauges.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/.cphorde/../ppcadsexpert.com/../adisgauges.com/inc_qty_ajax.php
<?php 
ob_start();
require_once("includes/dbsmain.inc.php");
include("site-main-query.php");
$site_url=$compDATA['admin_website_url'];

$qty=$_POST['qty_value'];
$id=$_POST['pro_id'];
$product_id=db_scalar("select bskt_prd_id from tbl_basket where 1 and bskt_id='$id' ");
$db_qty=db_scalar("select category_qnty from tbl_category where category_id='$product_id' ");

if($db_qty>=$qty)
{
   $procost=db_scalar("select bskt_prd_unit_price from tbl_basket where 1 and bskt_id='$id'");
   
    $total_cost=$qty*$procost;
    $update=db_query("update tbl_basket set bskt_prd_subtotal='$total_cost', bskt_prd_qnty='$qty' where 1 and bskt_id='$id'");
	//echo "$prd_id";
	//echo $total_cost;
	echo "updated";
}else
{
   // echo "Here is only ".$db_qty." left in stock, please enter equal or below ".$db_qty." !";
   echo "not available";
}


?>

MMCT - 2023