open($myFile); // open the zip file to extract if ($x === true) { $zip->extractTo($myDir); // place in directory with the same name $zip->close(); unlink($myFile); } $myMsg = "Your .zip file uploaded and unziped."; } else { $myMsg = "There was a some problem with the file upload."; } } } ?>