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.133.148.130
<?php
function saveeducationaldetails($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
include_once("/JSON.php");
$json = new Services_JSON();
$fieldarrvalue = stripslashes($aobj_context->mobj_data["fieldarrvalue"]);
$ug = stripslashes($aobj_context->mobj_data["ug"]);
$pg = stripslashes($aobj_context->mobj_data["pg"]);
$persnaldet = $json->decode($fieldarrvalue);
$persarr = get_object_vars($persnaldet);
$query = "insert into qualdetl(fuserid, fcourse, funivname, fyear, fsecmarks, fmaxmarks, fpercentage, fdivision, fsubjects, ftopic)
values ('{$userid}','10TH','{$persarr['T28']}','{$persarr['T29']}','{$persarr['T30']}','{$persarr['T31']}','{$persarr['T32']}','{$persarr['T33']}','{$persarr['T34']}','')
,('{$userid}','12TH','{$persarr['T35']}','{$persarr['T36']}','{$persarr['T37']}','{$persarr['T38']}','{$persarr['T39']}','{$persarr['T40']}','{$persarr['T41']}','')
,('{$userid}','{$ug}','{$persarr['T42']}','{$persarr['T43']}','{$persarr['T44']}','{$persarr['T45']}','{$persarr['T46']}','{$persarr['T47']}','{$persarr['T48']}','')
,('{$userid}','{$pg}','{$persarr['T50']}','{$persarr['T51']}','{$persarr['T52']}','{$persarr['T53']}','{$persarr['T54']}','{$persarr['T55']}','{$persarr['T56']}','')
,('{$userid}','MPH','{$persarr['T57']}','{$persarr['T58']}','{$persarr['T59']}','{$persarr['T60']}','{$persarr['T61']}','{$persarr['T62']}','{$persarr['T63']}','{$persarr['T64']}')
,('{$userid}','PHD','{$persarr['T65']}','{$persarr['T66']}',' ',' ',' ',' ',' ','{$persarr['T67']}')
,('{$userid}','OTH','{$persarr['T68']}','{$persarr['T69']}','{$persarr['T70']}','{$persarr['T71']}','{$persarr['T72']}','{$persarr['T73']}','{$persarr['T74']}',' ')
,('{$userid}','JRE','{$persarr['T75']}',' ',' ',' ',' ',' ','{$persarr['T76']}',' ')
,('{$userid}','NET','{$persarr['T77']}',' ',' ',' ',' ',' ','{$persarr['T78']}',' ')
,('{$userid}','SLET','{$persarr['T79']}','',' ',' ',' ',' ',' {$persarr['T80']}',' ')";
//var_dump($persarr['T32']);
$result = $aobj_context->mobj_db->Execute($query);
if($result)
{
$arr='Updated Successfuly';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr='Insertion Failed';
echo $aobj_context->mobj_output->ToJSONEnvelope($lquery,-1,"failure");
return;
}
}
function loadEducationalDetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$userid = $_SESSION['userid'];
$query1 = "SELECT * FROM qualdetl
where fuserid = '{$userid}'";
$result1 = $aobj_context->mobj_db->GetAll($query1);
if($result1)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result1,0,"success");
}
else
{
$arr = "Some Failure as occured";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
}
}
?>
|