Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.142.198.148
<?php
function saveBankDetails($aobj_context){
$data = json_decode(file_get_contents('php://input'), true);
$regno = $aobj_context->mobj_data['regno'];
$bankname = $data['bankname'];
$accno = $data['accno'];
$ifsc = $data['ifsc'];
$pan = $data['pan'];
$query = "update masteach set faccno='{$accno}', fifsccode='{$ifsc}',
fbankname='{$bankname}', fpanno='{$pan}'
where fteachcode = '{$regno}'";
$result = $aobj_context->mobj_db->Execute($query);
if($result){
$arr['msg'] = 'Bank Details Updated';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 0, "success");
}else{
$arr['msg'] = 'Failed to update bank details';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return;
}
}
function getBankDetails($aobj_context){
$regno = $aobj_context->mobj_data['regno'];
$query = " select faccno, fifsccode, fbankname, fpanno from masteach
where fteachcode = '{$regno}' or fmobile = '{$regno}'";
$result = $aobj_context->mobj_db->GetRow($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
}else{
$arr['msg'] = 'Failed to get the bank details';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return;
}
}
?>
|