<?php
include("../../db.php");
error_reporting(E_ALL);
header("Access-Control-Allow-Origin: * ");

	 
	 
	    $abc=$_POST['json'];
        $idata=json_decode($abc,true);
	 

            $id= $idata['id'];
            $session= $idata['session'];
            $section= $idata['section'];
            $class= $idata['class'];
            $comment= $idata['comment'];
            $Added_by= $idata['Added_by'];
            $date=date("Y-m-d");
                  
	    $aryData=array(
		"details"=>$comment,
		"date" =>  $date,
		"student_id" =>$id,
		"class" =>$class,
		"section" =>$section,
		"school_id"=>1,
		"session"=>$session,
		"Added_by"=>$Added_by,
);
 	 	
  		$insert_complain=$db->insertAry("performance",$aryData);
  		
  		
  		 
  if($insert_complain>0){ 
  
  $msg="Notice Added successfully.!";
  
  
  }
  
	if($msg!="")
	{  
		echo json_encode(array('status' => 1, 'msg'=>'Done', "data"=>$msg));    
			
	}
	else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'Performance not Added. Please try again later..!'));
	}
