I am trying to use a form and submit 4 files (font files) to the same directory.

Right now this is the code I have...
HTML Code:
<?php
// EOT FONT UPLOAD
if (isset($_FILES["eot"]))
{
$file = $_FILES["eot"];
$file_name = $_FILES["eot"]["name"];
$file_error = $_FILES["eot"]["error"];
$file_tmpname = $_FILES["eot"]["tmp_name"];
$file_ext = ".eot";

if ($file_error > 0)
    {
    echo "There was a problem uploading your font. <br />Error Code: " . $file_error . ".<br />";
    }
else
    {
		if (file_exists("/_css/_fonts/" . $file_name))
		{
		  echo $file_name . " already exists. ";
		}
		else
		{
		  move_uploaded_file($file_tmpname,
		  "_css/_fonts/" . $_POST['name'] . $file_ext);
		}
	}
}
// END UPLOAD

// WOFF FONT UPLOAD
if (isset($_FILES["woff"]))
{
$file = $_FILES["woff"];
$file_name = $_FILES["woff"]["name"];
$file_error = $_FILES["woff"]["error"];
$file_tmpname = $_FILES["woff"]["tmp_name"];
$file_ext = ".woff";

if ($file_error > 0)
    {
    echo "There was a problem uploading your font. <br />Error Code: " . $file_error . ".<br />";
    }
else
    {
		if (file_exists("/_css/_fonts/" . $file_name))
		{
		  echo $file_name . " already exists. ";
		}
		else
		{
		  move_uploaded_file($file_tmpname,
		  "_css/_fonts/" . $_POST['name'] . $file_ext);
		}
	}
}
// END UPLOAD

// TTF FONT UPLOAD
if (isset($_FILES["ttf"]))
{
$file = $_FILES["ttf"];
$file_name = $_FILES["ttf"]["name"];
$file_error = $_FILES["ttf"]["error"];
$file_tmpname = $_FILES["ttf"]["tmp_name"];
$file_ext = ".ttf";

if ($file_error > 0)
    {
    echo "There was a problem uploading your font. <br />Error Code: " . $file_error . ".<br />";
    }
else
    {
		if (file_exists("/_css/_fonts/" . $file_name))
		{
		  echo $file_name . " already exists. ";
		}
		else
		{
		  move_uploaded_file($file_tmpname,
		  "_css/_fonts/" . $_POST['name'] . $file_ext);
		}
	}
}
// END UPLOAD

// SVG FONT UPLOAD
if (isset($_FILES["svg"]))
{
$file = $_FILES["svg"];
$file_name = $_FILES["svg"]["name"];
$file_error = $_FILES["svg"]["error"];
$file_tmpname = $_FILES["svg"]["tmp_name"];
$file_ext = ".svg";

if ($file_error > 0)
    {
    echo "There was a problem uploading your font. <br />Error Code: " . $file_error . ".<br />";
    }
else
    {
		if (file_exists("/_css/_fonts/" . $file_name))
		{
		  echo $file_name . " already exists. ";
		}
		else
		{
		  move_uploaded_file($file_tmpname,
		  "_css/_fonts/" . $_POST['name'] . $file_ext);
		}
	}
}
// END UPLOAD
?>
But I know there is a simpler way using array and foreach (i think), but I just can't get my head around it.