Tools, FAQ, Tutorials:
FORM Tag for Uploading Files in PHP
How To Write the FORM Tag Correctly for Uploading Files in PHP?
✍: FYIcenter.com
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"); ?>
2016-10-17, 739👍, 0💬
Popular Posts:
What is json.tool? Can I use it to convert a JSON string a pretty-print format? json.tool is a speci...
How to search for the first match of a regular expression using re.search()? The re.search() functio...
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
What Is session_register() in PHP? session_register() is old function that registers global variable...
How to use the "send-request" Policy statement to call an extra web service for an Azure API service...