<?php
include('../include/config.php');
error_reporting(0);
session_start();
$iduser=$_SESSION['user_id'];
$date = new DateTime("now", new DateTimeZone('Africa/Nairobi') );
$timenow=$date->format('Y-m-d H:i:s');
$timenow2=$date->format('Y-m-d');
$month=$date->format('M');

if(isset($_POST['ans']))
{
$ans=addslashes($_POST['ans']);

$sql=mysqli_query($con,"UPDATE emailsend SET confirm='$ans'");
if($sql)
{
$msg='updated fee payment confirmation emails setting';
$sql3=mysqli_query($con,"INSERT INTO activity(user,Action,Tim,Dat,shortmsg,Month)values('$iduser','$msg','$timenow','$timenow2','update','$month')");

echo "Successfully saved";
}else
{
echo 'Unable to save';
}
}

?>