Upload script with directory selection

Im working currently of a PDF upload section to a site but im stuc a little, i need to upload to sevral subdirs… i have my uploadscript working fine but now i need to enter a section to select in what directory they can upload… with a selectbox

	function getext($filename,$tolower = true) {
    	$split = explode (".", $filename);
    	$index = (count($split) - 1);
		return ($tolower ? strtolower($split[$index]) : $split[$index]);

	$path = $_SERVER['DOCUMENT_ROOT']."M:\\hosting\\web\\prijs_lijst_pdf\\";
		if (!empty($_FILES['file']['name'])){
			$formats = array('exe','mov','swf'); //* lijst met verboden file extensies, lowercase *//
			if(in_array(getext($_FILES['file']['name']),$formats)) {
					echo "<br>&nbsp;&nbsp;<font class=\"error\">U heeft een verboden bestands type uit gekozen..!</b>"; //* file extentie error message *//
			} else {
					if(!is_dir($path)) mkdir("$path" . $_POST['dir'], 0777);
					copy($_FILES['file']['tmp_name'], $path . $_FILES['file']['name']);
					echo "<br>&nbsp;&nbsp;<font class=\"error\">Bestand geupload met succes..<Br>";
		} else {

			echo "";


<table cellspacing="2" cellpadding="2" border="0">
<form enctype="multipart/form-data" method="post" action="<?=$_SERVER['PHP_SELF'];?>">
    <td><input type="file" size="20" name="file">&nbsp;

<select name="welk">
<option>--Upload directory--
<br><input type="submit" name="upload" value="Upload"></td>


this is what i have currently… :trout: