<?php 	
require_once '../../Server/connection.php';
if($_POST) {	

	$procRequestItemStatus = false;
	
	for($x = 0; $x < count($_POST['cate_name']); $x++) {			
		

				// add into order_item
				$procRequestItemSql = "INSERT INTO expcate (name) 
				VALUES ('".$_POST['cate_name'][$x]."')";

				$conn->query($procRequestItemSql);		

				if($x == count($_POST['cate_name'])) {
					$procRequestItemStatus = true;
					
					
				}	

		
	} // /for quantity

	$valid['success'] = true;
	$valid['messages'] = "Category is Successfully Added";		
	
	$conn->close();
     
	 
	echo json_encode($valid);
 
} // /if $_POST
// echo json_encode($valid);