} else { $msg = '<div class="callout callout-warning"> <h4>Supplier Does not exist!!</h4> </div>'; } } /*Form submits -- start*/ //advance if (isset($_POST['submit_1'])) { $supcode1 = $_POST['hiddensupcode1']; $total_amount = $_POST['total_amount']; $des = $_POST['des']; $editor = $row['id']; if ($dbupdates->checkSupplierExist($supcode1) == true) { $datafields = array($formateddate, $supcode1, "adv", "", "", $total_amount, "1", $total_amount, $des, $editor); $res = $dbupdates->addTodayService($datafields); if ($res == true) { echo '<script>$(function(){ swal("Success!", "Successfully inserted","success")}); </script>'; } else { echo '<script>$(function(){ swal("Error!",""Error of Connection...",error")}); </script>'; } //echo($res);</script> } } if (isset($_POST['submit_2'])) { $supcode2 = $_POST['hiddensupcode2']; $loancode = $_POST['selectdd']; $unit_price = $_POST['amountofaqty']; $qty = $_POST['qty']; $p_total_amount = $_POST['producttotal']; $p_installments = $_POST['productpaymentmonths'];