first commit
This commit is contained in:
25
old/CONTENT/POST_ACTION/add_installment.php
Normal file
25
old/CONTENT/POST_ACTION/add_installment.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
//var_dump($_POST);exit();
|
||||
if(isset($_POST["add_i"]) && isset($_POST["AA_ACNO"]) && is_numeric($_POST["add_i"]) ) {
|
||||
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
|
||||
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
|
||||
if($conn->query("UPDATE `".$GLOBALS['arif_ac']."` SET `AA_BAL` = `AA_BAL`+".$_POST["add_i"]." , `AA_NO_OF_PAYPAID` = `AA_NO_OF_PAYPAID`+1 WHERE `AA_ACNO` = '".$_POST["AA_ACNO"]."'"))
|
||||
//Add entry to Transaction
|
||||
{
|
||||
$AT_USER="Admin";
|
||||
if($conn->query("INSERT INTO `".$GLOBALS['arif_tran']."` (`AT_ID`, `AT_TIMESTAMP`, `AT_ADMIN`, `AT_ACID`, `AT_AMOUNT`) VALUES (NULL, CURRENT_TIMESTAMP, '".$AT_USER."', '".$_POST["AA_ACNO"]."', '".$_POST["add_i"]."')"))
|
||||
$GLOBALS['post_info']="Transaction Success!";
|
||||
else $GLOBALS['post_info']="Error! Config or server";
|
||||
|
||||
/*
|
||||
INSERT INTO `arif_tran` (`AT_ID`, `AT_TIMESTAMP`, `AT_ADMIN`, `AT_ACID`, `AT_AMOUNT`) VALUES (NULL, CURRENT_TIMESTAMP, '', '000', '32');
|
||||
$stmt = $conn->prepare("INSERT INTO `".$GLOBALS['arif_tran']."` (`AT_USER`,`AT_ACID`,`AT_AMOUNT`) VALUES (?, ?, ?)");
|
||||
$stmt->bind_param("ssi" ,$AT_USER,$_POST["AA_ACNO"],$_POST["add_i"]);
|
||||
if($stmt->execute()){
|
||||
$GLOBALS['post_info']="Transaction Success!";
|
||||
} else $GLOBALS['post_info']="Error! Config or server";
|
||||
*/
|
||||
}
|
||||
}else $GLOBALS['post_info']="Error! Check input details";
|
||||
$conn->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user