> function get_file_extension($file) { http://us2.php.net/manual/en/function.pathinfo.php <?php $path_parts = pathinfo('/www/htdocs/index.html'); echo $path_parts['dirname'], "\n"; echo $path_parts['basename'], "\n"; echo $path_parts['extension'], "\n"; echo $path_parts['filename'], "\n"; // since PHP 5.2.0 ?> Secondly the MIME type can differ from the extension (file suffix) It's the same with uploaded files. Although the browser sends the MIME type it might not be the right one, since browsers obtain the MIME by checking the extension. //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php