<?php
include("../../db.php");
//header("Access-Control-Allow-Origin: * ");
header('Content-Type: application/json');


  $criteria= $_REQUEST['criteria'];

 	$cri="select * from criteria where type='".$criteria."' and school_id='1'";
       
	$result_criteria = mysql_query($cri);
   while ($rowp = mysql_fetch_assoc($result_criteria)) 	
	{
    	$jsonp[]=$rowp['name'];
 	    
	    
	}
	
	if(is_array($jsonp) && count($jsonp)>0)
	{  
		echo json_encode(array('status' => 1, 'msg'=>'Data found Successfully..!', "data"=>$jsonp));    
			
	}else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'No Images Found..!'));
	}
	
  	   
		
		

?>