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
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

        )

 

)

Link to comment
Share on other sites

  <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>

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.