How To Write the FORM Tag Correctly for Uploading Files?
Submitted by: AdministratorWhen 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"
." globalguideline.com:<br>n");
print("<input type=file name=globalguideline_logo><br>n");
print("<input type=submit>n");
print("</form></html>n");
?>
Submitted by: Administrator
<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"
." globalguideline.com:<br>n");
print("<input type=file name=globalguideline_logo><br>n");
print("<input type=submit>n");
print("</form></html>n");
?>
Submitted by: Administrator
Read Online PHP Job Interview Questions And Answers
Top PHP Questions
☺ | What is the difference between PHP4 and PHP5? |
☺ | What is the difference between characters \023 and \x23? |
☺ | How To Download and Install PHP on Windows? |
☺ | What are the difference between abstract class and interface? |
☺ | How many ways we can pass the variable through the navigation between the pages? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |