<?php 
include_once 'db_functions.php'; 
$db = new DB_Functions(); 
$json = $_REQUEST["usersJSON"];
if (get_magic_quotes_gpc()){ 
	$json = stripslashes($json); 
}
//Decode JSON into an Array 
$data = json_decode($json);
//Util arrays to create response JSON 
$a=array();
//$ei = $_REQUEST[eid];
for($i=0; $i<count($data) ; $i++) {
	//Store User into MySQL DB 
	$res = $db-> product_feedback($data[$i]->fb_subj,$data[$i]->fb_type,$data[$i]->feedback,$data[$i]->image,$data[$i]->userid,$data[$i]->latitude,$data[$i]->longitude,$data[$i]->address,$data[$i]->distance,$data[$i]->imei,$data[$i]->model_id);
	//Based on inserttion, create JSON response     
	array_push($a,$res);
}
echo json_encode($a); 
 ?>