I have found a "cure" to the problem, by using this form :
$kb = round($max_file_size/1024);
<form enctype='multipart/form-data' action='$PHP_SELF' name='upload' method='post'>
<input type='hidden' name='action' value='upload'>
<input type='hidden' name='MAX_FILE_SIZE' value='$max_file_size'>
File must not exceed $kb Kb.<br>
<input type='file' name='file' value='' size=30><br>
<br>
<input type='submit' name='submit' value='Add'><br;
The trick is where $kb is calculated and MAX_FILE_SIZE is set. If any files are above the $kb-limit. But ... there's a but!
What do I do if the user decides to try and upload a file larger than allowed. Then this error arise :
Warning: Max file size exceeded - file [file] not saved in Unknown on line 0
... and that is really bothering me. How do I catch that error (which is always shown at top of the script!) so I can make my own way of handling the error!?
PLEASE HELP ME and a couple of other souls!
Phew - that was a big one!