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 : 18.188.218.140
<?php
include("config.php");
include ('../../../sms/sendsmsapiv1.php');
$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$username = "admin";
$password = "T0g3th3r@all";
$database = "logisys3_demo";
$conn = new mysqli($servername,$username,$password,$database);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
error_reporting(E_ALL);
ini_set('display_errors', 'on');
$FMEMNAME = $_POST["FMEMNAME"];
$FBATCH = $_POST["FBATCH"];
$FMOBILE = $_POST["FMOBILE"];
$FDEGREE = $_POST["FDEGREE"];
$FCNTCODE = $_POST["FCNTCODE"];
$FEMAIL = $_POST["FEMAIL"];
$FALTMOBILE = $_POST["FALTMOBILE"];
$FALTCNTCODE = $_POST["FALTCNTCODE"];
$FYOA = $_POST["FYOA"];
$FYOM = $_POST["FYOM"];
$comadres1 = $_POST["comadres1"];
$comadres2 = $_POST["comadres2"];
$pincodecom = $_POST["pincodecom"];
$statec = $_POST["statec"];
$ccountry = $_POST["ccountry"];
$peradres1 = $_POST["peradres1"];
$peradres2 = $_POST["peradres2"];
$pincodeper = $_POST["pincodeper"];
$statep = $_POST["statep"];
$pcountry = $_POST["pcountry"];
$FJOBDESC = $_POST["FJOBDESC"];
$data = json_decode($_POST["data"],true);
$date = date('Y-m-d H:i:s');
$query = "update memhead set FBATCH='{$FBATCH}', FDEGREE = '{$FDEGREE}', FALTCNTCODE = '{$FALTCNTCODE}',
FALTMOBILE = '{$FALTMOBILE}',FYOA = '{$FYOA}',FYOM ='{$FYOM}',FADDC1 ='{$comadres1}',
FADDC2 = '{$comadres2}',FPINCODEC = '{$pincodecom}',FSTATEC = '{$statec}',FCONTC = '{$ccountry}',
FADDP1 ='{$peradres1}',FADDP2 ='{$peradres2}',FSTATEP ='{$statep}',FCONTP ='{$pcountry}',
FPINCODEP ='{$pincodeper}', FJOBDESC = '{$FJOBDESC}' where FMOBILE = '{$FMOBILE}'";
var_dump($query);die();
$result = mysqli_query($conn,$query);
foreach($data as $val){
$quer = "INSERT INTO memref (FMEMNAME, FMOBILE,FEMAIL,FLOGDATE)
VALUES ('{$val['name']}','{$val['mobile']}','{$val['email']}','{$date}')";
$result1 = mysqli_query($conn,$quer);
}
if($result){
$row["error_code"] = "success";
$row["msg"] = "Successfully Updated";
echo json_encode($row);
}else{
$row['error_code'] = 'invalid';
$row["msg"] = "Failed Updated";
echo json_encode($row);
}
mysqli_close($conn);
?>
|