Upload Error Handler

There are 2 configs in php.ini related to upload process:

  • post_max_size
  • upload_max_filesize

If the size of your post is over post_max_size, system could cause an error without any warning and $_POST could be empty for no reason. So it’s important to check post size before you start to process a form submit.

Helper functions:

Other programming issue: