sassenach 0 Junior Poster in Training

Hi,

I am using a script to upload media files. Here it is:

$filename_audio = 'uploadintaudio';
	   $tmpName_audio = $_FILES[$filename_audio]['tmp_name'];
	   if(empty($_POST['intclip_which']))  {$_POST['intclip_which'] = 0;}	   
	   if($_POST['intclip_which'] == 1){	//change image only				
	   	echo 'MEDIA --> <br/>
	   	name '.strtolower($_FILES[$filename_audio]['name']).'<br/>
	   	isset? '.isset($_FILES[$filename_audio]).'<br/>	   	
	   	which '.$_POST['intclip_which'].'<br/>
	   	error '.$_FILES[$filename_audio]['error'].'<br/>
	   	type '.ereg($media_types,strtolower($_FILES[$filename_audio]['type'])).'----
	   	'.$_FILES[$filename_audio]['type'];	   
		   if (isset($_FILES[$filename_audio]) && ($_FILES[$filename_audio]['error'] != 4) && ereg($media_types,strtolower($_FILES[$filename_audio]['type']))) {     
		   		$intaudio = array_change_key_case($_FILES[$filename_audio],CASE_LOWER);			   		
		   	} else {
	        $intaudio = FALSE;
	        $ErrorMsg .= 'Either the file format is incorrect or you have not choosen a media file.<br />';			   				   		
	     	} 
		 } else {$intaudio = TRUE;} 
		 $intaudio_name = strtolower($intaudio['name']); 	    
	   $intaudio_type = strtolower($intaudio['type']); 	    
	   $intaudio_size = strtolower($intaudio['size']);

Note:

$media_types = "(rmi|wav|wma|wmv|wm|wmvhd|wax|mpg|mid|midi|mpeg|m1v|mp2|mp3|mpa|mpe)\$";/*avi|asf|asx|*/

You can see i print (echo) the file name, error, type, etc. This is my result:

MEDIA -->
name butterfly.wmv
isset? 1
which 1
error 1
type ----

As you can see the file type is missing. And the error =1 which means the max-uploadsize is not enough. The file size im trying to upload is 2.5M and my max post and max upload size is set to 50M.

I am not sure where the problem is.

Any help is welcomed.

thanks