This is one of the weaknesses of php. You can not use php to check the file size until AFTER the file/image has been SUCCESSFULLY uploaded to the server.
You also can not use javascript to access the client side file system. This is an area where i see Adobe Flash upload scripts really fill the gap. As they tend to be able to check the size of the file prior to the upload occurring.
I'd suggest looking into some of the many flash upload scripts that exist and how to tie them into php, unless someone else has a more controlled solution.
Reputation Points: 265
Solved Threads: 126
Practically a Master Poster
Offline 624 posts
since Jul 2008