If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Max file size during upload, empty $_POST annoyances

I am creating a PHP upload form for the first time. I realize that if the file exceeds the max file size specified in php.ini that I will lose ALL my $_POST variables, which I don't like, but I am resigned to it. What I want to do is DETECT when this has happened, present an error to the user, and force them to go back to a page where the workflow can kind of start again and my $_POST variables will be retained.

How can I detect when the file they're attempting to upload is too big? Or, even better, can I use javascript to cancel the form submission if the file is too big!?