G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); $empids = $_SESSION['empids']; include("config.php"); date_default_timezone_set('Asia/Muscat'); $de = date('d-m-Y H:i:s'); $sno =1; $result = $js->query('SELECT * FROM `income` ORDER BY `id`'); $result->execute(); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $nw = $row['id']+1; } $sno = 'INC'.$nw; $paiddate = $_POST['paiddate']; $creditdate = $_POST['creditdate']; $customer = $_POST['customer']; $paidfor = $_POST['paidfor']; $r_cash = $_POST['r_cash']; $r_mode = $_POST['r_mode']; if($r_mode == 'Cash') { $banks = ''; } else { $banks = $_POST['banks']; } $vats = $_POST['vats']; $paidthru = $_POST['paidthru']; $r_remarks = $_POST['r_remarks']; $js->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = $js->prepare('INSERT INTO `income` (`incid`, `incdate`, `creditdate`, `custid`, `incheads`, `incamount`, `pmode`, `banks`, `vatstatus`, `paidthru`, `premarks`, `enteredby`, `addedtime`) VALUES (:sno, :paiddate, :creditdate, :customer, :paidfor, :r_cash, :r_mode, :banks, :vats, :paidthru, :r_remarks, :empids, :de)'); $status = $sql->execute(array(':sno' => $sno, ':paiddate' => $paiddate, ':creditdate' => $creditdate, ':customer' => $customer, ':paidfor' => $paidfor, ':r_cash' => $r_cash, ':r_mode' => $r_mode, ':banks' => $banks, ':vats' => $vats, ':paidthru' => $paidthru, ':r_remarks' => $r_remarks, ':empids' => $empids, ':de' => $de)); if ($status) { ?> <script type="text/javascript"> alert("Have Successfully Added Income"); window.location='income.php' </script> <?php } ?>