http://is.php.net/manual/en/features.file-upload.php
There you can see how to use the $_FILES autoglobals ($HTTP_POST_FILES in php versions prior 4.1.0) to get the size of the uploaded file in bytes. So, for example, you can do this before saving the uploaded file: if($_FILES['userfile']['size'] > $maxsize){ echo "Error. The file was to large. Max file size is $maxsize."; } -----Original Message----- From: Dani Matielo [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 14:25 To: [EMAIL PROTECTED] Subject: [PHP] File upload: type and size question Hello, could someone help me? I am trying to limit the type and size of the files to be uploaded, but I can't find how to do this. I have seen examples on how to limit to image types, with the MIME function. The problem is, the type of file I want is audio, extensions MP3 or WAV. The max file size should be 150Kb. Thank you for your help! :)) Dani --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php