Hello
First, you can add this tag as first one in the form tag, that limits the size on the client side:
HTML Code:
<input type="hidden" name="MAX_FILE_SIZE" value="200000" />
Naturaly, the value "200000" is an example !
On the server side, you can control the size by the $_FILES function:
PHP Code:
if ($_FILES['fileName']['error']==2) {
$Tmsg = 'Too big file (it must not be greater than '.$_POST['MAX_FILE_SIZE'].' octets)';
...display this information or do what you want}
"fileName" is an example, too. It's the name of the file in the form tag (<input type='file', name='fileName'... />).
But I don't know really if the system on the server knows immediatly the size or if it begins the load !
Try it and eventually see the PHP documentation.
Good year