<?php
$uploaddir = './email_templates/'; 
$file = $uploaddir . basename($_FILES['uploadfile']['name']); 
 
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) { 

	
$zip = new ZipArchive;
if ($zip->open($file) === TRUE) {
$zip->extractTo($uploaddir);
$zip->close();

unlink($file);

} 
echo "success"; 
}else {
echo 'failed';
} 




?>