Uploading Files with File Input Fields in a Form
How To Write the FORM Tag Correctly for Uploading Files?
When users clicks the submit button, files specified in the <INPUT TYPE=FILE...> will be transferred from the browser to the Web server. This transferring (uploading) process is controlled by a properly written <FORM...> tag as:
<FORM ACTION=receiving.php METHOD=post ENCTYPE=multipart/form-data>
Note that you must specify METHOD as "post" and ENCTYPE as "multipart/form-data" in order for the uploading process to work. The following PHP code, called logo_upload.php, shows you a complete FORM tag for file uploading:
<?php print("<html><form action=processing_uploaded_files.php" ." method=post enctype=multipart/form-data>\n"); print("Please submit an image file a Web site logo for" ." fyicenter.com:<br>\n"); print("<input type=file name=fyicenter_logo><br>\n"); print("<input type=submit>\n"); print("</form></html>\n"); ?>
2007-02-27, 5006👍, 0💬
How can you enable automatic paging in DataGrid ? Following are the points to be done in order to en...
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
How do we assign page specific attributes ? Page attributes are specified using the @Page directive.
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 1...
Where are cookies actually stored on the hard disk? This depends on the user's browser and OS. In th...