Question: How To Write the FORM Tag Correctly for Uploading Files?
Answer: 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>
"); print("Please submit an image file a Web site logo for" ." fyicenter.com:<br>
"); print("<input type=file name=fyicenter_logo><br>
"); print("<input type=submit>
"); print("</form></html>
"); ?>
Question:
How To Write the FORM Tag Correctly for Uploading Files? Answer:
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>
"); print("Please submit an image file a Web site logo for" ." fyicenter.com:<br>
"); print("<input type=file name=fyicenter_logo><br>
"); print("<input type=submit>
"); print("</form></html>
"); ?> Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.