[PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread JFL
When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- [ www.eksperten.dk ] Scandinavias biggest

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread James Holloway
Jacob, When you upload a file, it appends a few of its own variables. One of them is size - assuming the file is a variable called $file: if ($file_size $max_size) { echo $file_name . was too big!; } Also, you could check for Mime types. if ($file_type != image/jpeg || $file_type !=

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread JFL
Thanks :) -- [ www.eksperten.dk ] Scandinavias biggest IT forum. James Holloway [EMAIL PROTECTED] wrote in message 9db61u$7d9$[EMAIL PROTECTED]">news:9db61u$7d9$[EMAIL PROTECTED]... Jacob, When you upload a file, it appends a few of its own variables. One of them is size - assuming the file

Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread Toby Dacre
the problem with doing it on your server (you do it just to be sure though) is that the user has to wait for the form + file to be sent to your server before you can respond - this can be very slow JFL [EMAIL PROTECTED] wrote in message 9davlf$s63$[EMAIL PROTECTED]">news:9davlf$s63$[EMAIL