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


	$class=$_REQUEST['class'];
	$section=$_REQUEST['section'];
	$subject=$_REQUEST['subject'];
	$url=$_REQUEST['url'];
	$date=$_REQUEST['date'];
	$time=$_REQUEST['time'];
	$id=$_REQUEST['id'];
    $status=$_REQUEST['status'];


/*	
	$name=mysql_real_escape_string($name);
	$class=mysql_real_escape_string($class);
	$fname=mysql_real_escape_string($fname);
	$mname=mysql_real_escape_string($mname);
	$mobile=mysql_real_escape_string($mobile);

 */
	 
	 
 //print_r($aryData);
 
//  $sql = "UPDATE liveclass_meet SET class='$class',section='$section',chapter='$chapter',topic='$topic',url='$url',date='$date',time='$time',status='$status' WHERE id='$id'";

  		//$insert_complain=$db->insertAry("liveclass_meet",$aryData);
	
	$aryData = array(
	    "class"   => $class,
	    "section" => $section,
	    "subject" => $subject,
	    "url"     => $url,
	    "date"    => $date,
	    "time"    => $time,
	    "status"  => $status
	    );
	
	
	$sql = $db->updateAry("liveclass_list", $aryData, " where id='$id' " );

    if ($sql > 0) {
    $msg="data update successfully";
    }


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