Jump to content

[SOLVED] MP3 upload error


PyraX

Recommended Posts

Hi im using forms to upload files and it seems to be ok with most things but not .mp3

 

form code is:

 

method post

 

<input type='hidden' name='MAX_FILE_SIZE' value='100000000' />
<input type='hidden' name='upload' value='true' />
Choose a news .pdf to upload. <input name='uploadedfile' size='37' type='file' />

 

take upload

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "";
} else{
    echo "There was an error uploading the file, please try again!";
}

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/63468-solved-mp3-upload-error/
Share on other sites

Check it just then here is the print_r($_files) at the other end

 

Array

(

    [uploadedfile] => Array

        (

            [name] => file.mp3

            [type] =>

            [tmp_name] =>

            [error] => 1

            => 0

        )

 

)

  <form id='form1' name='form1' enctype='multipart/form-data' method='POST' action='admin.php?do=news2'>
    <table width='500' border='0' cellpadding='2' cellspacing='2' bgcolor='#F2F2F2'>
      <tr>
        <td>Details</td>
        <td><input type='hidden' name='MAX_FILE_SIZE' value='100000000' />
<input type='hidden' name='upload' value='true' />
Choose a media .pdf or  to upload. <input name='uploadedfile' size='37' type='file' /><br />
</td>
      </tr>

      <tr>
        <td> </td>
        <td><div align='center'>
          <label>
          <input type='submit' name='takeme' value='Submit' />
          </label>
        </div></td>
      </tr>
    </table>
  </form>

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.