HTML - Submit File Upload Not Working In Firefox (input Type File)
The following common code is not working in Firefox (3.0.11). It works in Safari (4.02) and IE7. When I say not working, I mean that when I click the submit button, the address does not change to the form processing url:
Code: <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="mp3file" type="file" /> <input type="submit" name="submit" value="Send File" /> </form> The file uploader.php does nothing, it is blank, I'm merely trying to establish communication. Once again, the code functions in IE and Safari so I dont think this is PHP related. Similar TutorialsI have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? Any idea why the "theuploadedfile" input is not displayed when the program comes in after the submit ? PHP Code: <?php print 'Post=<pre>'; print_r($_POST);print '</pre>'; // PROBLEM $_POST['theuploadedfile'] IS NOT DISPLAYED (the text one is) ?> <form enctype="multipart/form-data" action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> <br>File to upload <input name="status" type="hidden" value="submitted"> <br>A<input name="thetexttype" type="text" size="100"> <br>B<input name="theuploadedfile" type="file" size="100" > <br><input name="submit" type="submit"> </form> Hi guys, I'm trying to create a form which uploads an image from the user and saves it in the database. However with the code I have so far it seems the input isn't working. Any help would be appreciated. This is what I have: <html> <head><title>Store image into SQL Database</title></head> <body> PHP Code: <?php if ($_POST[submit]) { include("connect.php"); $data = addslashes(fread(fopen($_POST[form_data], "r"), filesize($_POST[form_data]))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ". "VALUES ('$_POST[form_description]','$_POST[data]','$_POST[form_data_name]','$_POST[form_data_size]','$_POST[form_data_type]')"); $id= mysql_insert_id(); MYSQL_CLOSE(); } else { ?> HTML Code: <form method="post" action="imageupload.php" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </body> </html> Hi all, how can i upload a file and when i click the submit button i go automatically to other web page. I am using some code that uploads the file perfectly, but i can't get a way to go to other page when i click the submit button. If someone can help me giving me an example of how to do that, or tell me what to change in my code i'll appreciate any kind of help. Here is my code: PHP Code: <?php function error($errorMsg) { ?> <script> alert("<?php echo $errorMsg;?>"); </script> <?php } global $folder; $folder = "uploaded"; if(!is_dir($folder)) if(!mkdir($folder)) { error("Can't, neither, access, nor create, the upload folder"); die(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> body { background-color:#000000; } </style> <title>Upload</title> </head> <body> <center><h1><font color = "#FFFFFF" > Upload </font></h1></center> <?php function mainPage() { ?> <iframe style="display:none" name="fileUploader"></iframe> <form method="POST" target="fileUploader" enctype="multipart/form-data" action="?action=fileUploader"> <div><input name="file" type="file" STYLE="color:#FFFFFF; size="60"></div> <input type="submit" value="Upload" > </form> <?php } function fileUploader() { global $folder; function storeFile($folder,$tmpFileName,$fileName) { if(!is_uploaded_file($tmpFileName)) { error("Invalid file"); return; } if(!move_uploaded_file($tmpFileName, $folder . "/" . $fileName )) { error("Can't move uploaded file to destination"); return; } } foreach ($_FILES as $file) storeFile("uploaded",$file["tmp_name"],$file["name"]); } $actions = array("fileUploader" => 1,"fileLoader"=> 1); if (!isset($_GET['action'])) { //If not isset -> set with dumy value $_GET['action'] = "undefine"; } $action = $_GET["action"]; if($actions[$action]) $action(); else mainPage(); ?> </body> </html> Hi, I have got an input form to upload files; the form also accepts some other user input. The upload works fine, but I need to display some filenames by default, but this does not work. I tried using: <input type="file" name="images[]" value="<?php echo $default_filename; ?>"... This did not work, so I tried: <input type="file" name="images[]" value="Testfile.jpg"..., but this does not work too. All this is in a <form action="<?php echo $_PHP_SELF; ?>" method="post" enctype="multipart/form-data">. It seems to me that in an input field of type "file", default values are not accepted, though they should be according to the documentation. Any help will be greatly appreciated as I need this feature. Thanks On my page, I have a form: HTML Code: <div id="upfile"> <input type="file" name="uploadform" size="30" id="fileupload2"> </div> Now, I'm wondering, is there any way that I can set a default value for this? Ex "C:\My Documents\file.txt". I tried value=, but I guess it doesn't work for the "file" type. I'd change it, but I need it to be "file".. Any help? Edit: Just realized that spelling mistake in the title.. I have a HTML form that truncates the action parameter after the "?" mark - which is NOT the desired behavior I am looking for. I simply want to open the referenced URL within the same viewport. Here is a representative HTML snippet: HTML Code: <form action="http://www.spufalcons.com/index.aspx?tab=gymnastics&path=gym"> <input type="submit" value="Gymnastics"/> </form> In this case, the submit button takes you to the "http://www.spufalcons.com/index.aspx" page, effectively ignoring "?tab=gymnastics&path=gym" parameter. It appears that URL's using HTML and PHP pages referenced in the action=URL work as expected BUT (alas) this is not the case when the target page contains index.aspx. This behavior is consistent across all major browsers (IE, FF, Safari, Chrome, Opera). Has anyone seen this problem before? Or can suggest an alternative and/or workaround consistent with my "pure" CSS/HTML/PHP web development approach? I have tried replacing the special characters with HTML entity values with no impact. I REALLY don't want to use abandon my CSS-styled submit buttons by using Javascript or button PNG's or image maps. Environment: Web Server: Apache 2.2.14 PHP: 5.2.10 OS: Mac OS X 10.5.8 HTML document info: HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> You may have seen this question before, but I cannot for the life of me find an answer that works. I embedded a .swf flash file on a page on my website. This flash plays perfectly on IE and Chrome, but nothing shows up on Safari or Firefox. I, at first, wrote the code by hand. Then I instead used swfobject to properly write the code (this still hasn't fixed the problem) I used the w3 markup validation site to check the code, and it comes back with 0 errors. Any Ideas? The code is below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="posthink.swf"></script> <script type="text/javascript"> swfobject.registerObject("myFlashContent", "9.0.0"); </script> </head> <body> <div style="text-align: center;"> <object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="myFlashContent"> <param name="movie" value="posthink.swf" /> </object> </div> </body> </html> (I inserted a space in the classid= tag to do away with the : D turning into a smiley) Thanks for your help. Hi all, I've created a simple login with some free code i found online. I wanted to change the login button to an image, just for aesthetics, but no matter what i try, it wouldnt work - the form does make sure i'm entering the right user & password, but once i do enter them, i get the same page with an empty form. (if i try the original type="button" code, it works just fine) I've been googling it for hours, with no results... i've tried anything and everything. ANY help would do :-) this is the code: <script language="javascript"> <!--// function pasuser(form) {if (form.id.value=="1") {if (form.pass.value=="1") {location="MainPage.htm"} else {alert("Invalid Password")}} else {alert("Invalid UserID")}} //--> </script> these are the buttons: WORKING BUTTON: <input type="button" value="Login" onClick="pasuser(this.form)"> NOT WORKING BUTTON: <input type="image" value="Login" onClick="pasuser(this.form)" src="Materials/Login.png" alt="Login" /> hi, i was wondering what is the best filetype to use for a video on the internet? i need to embed a video which can be viewed by as many people as possible so i was thinking maybe .wmv or something that can be played through windows media play and most other common video player I am generating a data file for Excel using XML structure. I have found 2 MIME types with partially expected functionality: application/xml: this works well assuming the user has a version of Excel that is associated with the headers in the file and/or the user doesn't have XML files associated with a separate application. application/vnd.ms-excel: this tends to append ".xls" to the end of the filename. When opening the file, Excel generates a warning that the data formats do not match because it is expect XLS format. If there is a 3rd MIME type, I'm not using a search engine that is aware of it. Can anyone suggest a MIME type that forces the application to open in Excel without presuming XLS format? could some one please tell how to upload a file without using the submit button. Iknow the location of the file and i want to upload the file into the server Hi Guys and Gals! Looking for a little help on this one... I use a service that allows me to upload up to 20 photos to each of my work orders. The upload screen is set up with 20 seperate "Browse" lines (1 for each photo). I have requested that the page be recoded to accept a range of photos in a single "Browse" line, as opposed to one line for each. This would really cut down on the "clicking time" involved in attaching photos to an order. Heres my problem...they tell me that it cant be done, and blame it on Internet Explorer capabilities or lack of... Is this true? And if so, does IE version 7 support this functionality? Here is the current code from the upload screen: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>Attach Files to a Workorder</title> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <style type="text/css"> BODY { BACKGROUND-COLOR: linen; TEXT-ALIGN: center } </style> <script language="javascript"> <!-- function ConfirmDelete(filename){ var CompleteDelete = confirm("Are you sure you want to delete "+filename+"?"); if(CompleteDelete == true){window.location='MultipleFileUploads.aspx?id=123553&action=delete&filename='+filename} else{return false} } //--> </script> </HEAD> <BODY TEXT="1"> <div id="MultipleFileUploadForm"> <H3>Attachment Upload</H3> <div id=notesholder align=center style="text-align:left;width:600px;"> <UL> <LI> The files you upload here will not show as uploaded until you save your changes to the order. <LI> You cannot upload a file that is larger than 1MB <LI> All images that have a file size larger than 75KB will be automatically resized <LI> All images that have either a width or height greater than 640px will be resized proportionately <LI> All bitmap files will automatically be converted to JPGs <LI> All files will be renamed in the following format. ([Lastname]_[Firstname]_[JobNumber]_##.[extension]) </LI> </UL> </div> <form name="Form1" method="post" action="MultipleFileUploads.aspx?id=123553&Fname=Kracht&Lname=Jennifer&JobNum=1246607" id="Form1" enctype="multipart/form-data"> <input type="hidden" name="__VIEWSTATE" value="dDwtMzA1MTQwMjgyO3Q8O2w8aTwwPjtpPDE+Oz47bDx0PDtsPGk8MD47aTwyPjs+O2w8dDxAMDw7Ozs7Ozs7Ozs7Pjs7Pjt0PEAwPDs7Ozs7Ozs7Ozs+Ozs+Oz4+O3Q8cDxwPGw8VmlzaWJsZTs+O2w8bzx0Pjs+Pjs+O2w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DwvdGRcPlw8dGQgY29sc3Bhbj0iMiIgYWxpZ249InJpZ2h0Ilw+XDxpbnB1dCB0eXBlPWZpbGUgbmFtZT1maWxlIHN0eWxlPSJ3aWR0aDo0MDAiIGlkPWZpbGVcPjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPEZpbGUgMTg6XDwvdGRcPlw8dGQgY29sc3Bhbj0iMiIgYWxpZ249InJpZ2h0Ilw+XDxpbnB1dCB0eXBlPWZpbGUgbmFtZT1maWxlIHN0eWxlPSJ3aWR0aDo0MDAiIGlkPWZpbGVcPjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPEZpbGUgMTk6XDwvdGRcPlw8dGQgY29sc3Bhbj0iMiIgYWxpZ249InJpZ2h0Ilw+XDxpbnB1dCB0eXBlPWZpbGUgbmFtZT1maWxlIHN0eWxlPSJ3aWR0aDo0MDAiIGlkPWZpbGVcPjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPEZpbGUgMjA6XDwvdGRcPlw8dGQgY29sc3Bhbj0iMiIgYWxpZ249InJpZ2h0Ilw+XDxpbnB1dCB0eXBlPWZpbGUgbmFtZT1maWxlIHN0eWxlPSJ3aWR0aDo0MDAiIGlkPWZpbGVcPjs+Ozs+Oz4+Oz4+O3Q8cDxwPGw8VGV4dDs+O2w8S3JhY2h0Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxKZW5uaWZlcjs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8MTI0NjYwNzs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz4AnCFSfdJrtisPv3L2YbwsLOQZAw==" /> <table id="dlFORM" cellspacing="0" border="0" style="border-collapse:collapse;"> <tr> <td> File 1:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 2:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 3:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 4:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 5:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 6:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 7:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 8:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 9:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 10:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 11:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 12:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 13:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 14:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 15:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 16:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 17:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 18:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 19:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr><tr> <td> File 20:</td><td colspan="2" align="right"><input type=file name=file style="width:400" id=file> </td> </tr> </table> <br><br> <input name="Submit1" id="Submit1" type="submit" value="Upload Files" /> <BUTTON onclick="window.location='MultipleFileUploads.aspx?id=123553&action=viewall'" type=button>View All</BUTTON> <BUTTON onclick="window.close()" type=button>Close Window</BUTTON> </form> </div> <table align=center style="width:600px;"> <tr> <td align=left> </td> </tr> </table> </BODY> </HTML> Hi! I found out that file_names are not encoded properly when performing a HTTP multipart/form-data request. (It does not encode according to the encode type that we specify) I created a small web page which contains a input tag (file type) and tried a combination of "Enctype" and "accept-charset" in the form tag and nothing seems to work. Please find my tries in the attached zip file. (Please do change the action URL to one that is working, before you test). The RTF files contain the HTTP request header that I captured when the page is loaded from Chrome, Firefox, MSIE. Is there a way for me to fix this? /Boo I am trying to write a html form in which i want to provide a default file to be uploded from the clients computer. i tried doing it by setting the value attribute to a file in some location. However that file does not get uploaded.... can anybody help I have a browse button when user selects a file i want to display the files attached in a table with attached filename and date. can anybody tell me how to generate table dynamically. Hi, I have been using ext its really fun working on it. Question:-- How can I upload a (*.jpg,*.bmp etc) file from browser to java webserver and store the file in some temporary folder(so that form webserver I could upload the file to my application server). Ur repsonse can help me analyze the problem and its possible solutions. Thanks Hi, I've encountered this problem, and been struggling for few hours. Thing is, I have a form with enctype="multipart/form-data" and 2 inputs with type "file" in it with names RequestForm[doc1] and RequestForm[doc2]. When I submit the form, only the first one of the fields is sent into $_POST. If i comment out the 1st field, then only the second is sent. This thing is just killing me! Could someone help? What might be wrong? And yes, I do need 2 inputs, not 1 multifile input. Looking for a form / script to place on an HTML page that will accept not only a number of fields (name, email, etc) but a file (MS Word, TXT, or PDF) as well. Contents can either be stored in a SQL database, saved on server, or emailed to an account. Any help is appreciated. |