Hi folks

I have just written a file upload script, used for uploading html pages to my clients server and need a little hand with validation if possible?

How do you check uploaded file is '.html' format using example below?

//This is our limit file type condition
if ($uploaded_type =="text/php")
echo "No PHP files<br>";

How do I check that the file is named correctly?
I need the file to be named like so: AV1, AV2 (needs to have 'AV' then numerical number.

Any help would be greatly appreciated