sanfly Posted June 14, 2006 Share Posted June 14, 2006 HiI have a form which i am using as part of a PHP CMS system. This form is used to upload files for a few different things. It works fine for images and text files, but when i try an mp3 or wmv file, It doesnt pass the temp file: ie: $_FILES['new_file']['tmp_name']; is empty. Is there something different about uploading media files?Here is my form:[code]<form method="post" action="discography.php?action=editfile2" onsubmit="submitonce(this" enctype="multipart/form-data"> <table cellspacing="10"> <tr> <td align="right" valign="top"><b>File To Edit: </b></td> <td valign="top"><?=$edit_file?></td> </tr> <tr> <td align="right" valign="top"><b>Current File: </b></td> <td valign="top"> <?=$current_file?> </td> </tr> <tr> <td align="right" valign="top"><b>New File: </b></td> <td valign="top"> <input type="file" name="new_file" size="40"><br> <b>(Max File Size: <?=$max_file_size?>)</b> </td> </tr> <tr> <td align="center" colspan="2"> <br> <input type="hidden" name="file_type" value="<?=$type?>"> <input type="hidden" name="file_id" value="<?=$id?>"> <input type="button" onclick="history.back();" value="« CANCEL"> <input type="submit" value="UPLOAD FILE »"> </td> </tr> </table> </form>[/code] Link to comment https://forums.phpfreaks.com/topic/12012-form-uploader/ Share on other sites More sharing options...
zq29 Posted June 15, 2006 Share Posted June 15, 2006 Is $_FILES['new_file']['error'] returning anything other than 0? Link to comment https://forums.phpfreaks.com/topic/12012-form-uploader/#findComment-45818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.