Possible Duplicate:
How can I only allow certain filetypes on upload in php?
i'm learning PHp and Mysql. I want to create a function that allow only specific file extension which uploaded by user. Like..
$whitelist = array("jpg","jpeg","gif","png","bmp","pdf" );
So how do i check this specific file extension with php. Can anyone tell me please.. Thank you.