Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
docs:browsers:posting_forms [2009/06/26 15:15] – billh | docs:browsers:posting_forms [2009/11/03 10:17] (current) – billh | ||
---|---|---|---|
Line 29: | Line 29: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ===== handling max file size during uploads ===== | ||
+ | It is advisable to handle file sizes during uploads. | ||
+ | <input type=" | ||
+ | </ | ||
+ | |||
+ | Once the form is posted, you can check for errors like this:< | ||
+ | if( $_POST ){ | ||
+ | if( isset($_FILES[' | ||
+ | if( $_FILES[' | ||
+ | // process the uploaded file | ||
+ | }else{ | ||
+ | // there was an error | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | You can run a switch/case block if you prefer, and handle each error code differently. | ||
+ | * http:// | ||
+ | |||
===== multi select as an array ===== | ===== multi select as an array ===== | ||
To have the selections of a select element become an array when the form is posted, use [] in the variable name. | To have the selections of a select element become an array when the form is posted, use [] in the variable name. |