$_POST['name'],'type'=>$_POST['type'],'date'=>date("d/m/Y"), 'file'=>$file); $handle=fopen('../uploads/5/index.jsons','a'); fwrite($handle,json_encode($item)."\n"); fclose($handle); print $success ? $file : 'Unable to save the file.'; ?>