I have created a php page that allows users to upload files to a server. I have also created conditions that check to make sure the files being uploaded are either jpg, gif or png format, as well check to see if the file is less than 1MB using the following php:
if ( $_FILES['image']['size'] <= 1048576){ // output in bytes
However, when I attempt to upload images that exceed 1MB, the page allows the upload and does not display an error as I had programmed.
I am also using theHTML MAX_FILE SIZE like this:
<input type="hidden" name="MAX_FILE_SIZE" value="1048576" />
Any ideas? Could it possible be a server setting?