# PHP: MP3 Upload Form

**URL:** <https://forum.kirupa.com/t/php-mp3-upload-form/92970>\
**Category:** Uncategorized\
**Created:** [October 23, 2003, 8:51pm UTC](https://forum.kirupa.com/t/php-mp3-upload-form/92970 "2003-10-23T20:51:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rysolag](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@rysolag](https://forum.kirupa.com/u/rysolag)\
**Post date:** [October 23, 2003, 8:51pm UTC](https://forum.kirupa.com/t/php-mp3-upload-form/92970/1 "2003-10-23T20:51:20Z")

</div>

Alright…

```
I am trying to write a PHP page that will enable the user to upload an MP3 to a server. Here's my page:

```

## uploadMedia.php

\<html\>

\<head\>  
\<title\>\</title\>  
\</head\>

\<body\>

\<?  
if(!empty($\_FILES[“userfile”]))  
{  
echo “Something Came Through\<BR\>\<BR\>”;  
echo $\_FILES[“userfile”][“name”] . “\<BR\>\<BR\>”;

if($\_FILES[“userfile”][“tmp\_name”] == “”)  
echo “empty”;  
else  
echo $\_FILES[“userfile”][“tmp\_name”];  
}  
?\>

\<form method=“post” enctype=“multipart/form-data” action=“uploadMedia.php”\>  
\<input type=“file” name=“userfile”\>  
\<input type=“submit” value=“submit”\>  
\</form\>

\</body\>

\</html\>

* * *

## end

```
When submitted the $_FILES["userfile"] always has something but $_FILES["userfile"]["tmp_name"] is always empty and $_FILES["userfile"]["name"] always has the correct original file name . This means that the server is never storing the file.

I am testing this on my own computer at home running XP and IIS. Can anyone help?

```

Thanks
