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

	$student_id=$_REQUEST['student_id'];
	$class = $_REQUEST['class'];
	$section=$_REQUEST['section'];
	$chapter=$_REQUEST['chapter'];
	$topic=$_REQUEST['topic'];
	$teacher_id=$_REQUEST['teacher_id'];
	$session = $_REQUEST['session'];
	
	$user_email = $_REQUEST['user_email'];
	
	$msg = "";

	 $aryData=array(
	     "student_id" => $student_id,
		 "class"=>$class,
		 "section"=>$section,
		 "chapter"=>$chapter,
		 "topic"=>$topic,
		 "teacher_id"=>$teacher_id,
		 "session" => $session,
		 "user_email" => $user_email
	 );

  	$flgIn = $db->insertAry("meet_attendance",$aryData);

    if($flgIn>0){
      $msg="data registered successfully";
    }
	
	
	if($msg!="")
	{  
		echo json_encode(array('status' => 1, 'msg'=>'Done', "data"=>$msg));
	}
	else
	{
	 	echo json_encode(array('status' => 0, 'msg'=>'Data not inserted. Please try again later..!'));
	}