Is there a function or something that returns the extension of a file? If not, how would I go about getting a file extension. I'm trying to restrict uploads of certian extensions.
$_FILES['userfile']['type'] The mime type of the file, if the browser provided this information. An example would be "image/gif".
More ... refer PHP Manual Chapter 20. Handling file uploads http://www.php.net/manual/en/features.file-upload.php