<?
if(isset($_POST['myData'])){
error_log("\n function called after set:- ", 3, "my-errors.log");
 $remainingimage = $_POST['myData'];
$email="teamskenya@kenya.com";
$remainingimagename="taxi.png";
//$remainingimage="edasasdasdasdasd";
receiveimagefromphone($remainingimage,$email,$remainingimagename);
}

function receiveimagefromphone($remainingimage,$email,$remainingimagename)
{
	//echo "in function";
	//echo $remainingimage;
	//echo $remainingimagename;
	 $subdir="../FBTempReport/".$email;
     mkdir($subdir, 0777, true);
	 $subdir="../FBTempReport/".$email."/";
    file_put_contents($subdir.$remainingimagename, base64_decode($remainingimage));
	
	 error_log("\n function called :- ", 3, "my-errors.log");

}
?>