add the following code at line 1 of your page:
<?php
if(isset($_FILES)) {
foreach($_FILES as $k => $v) {
$_FILES[$k]["name"] = strtolower(str_replace(array(" ","-","\\","'"), "", preg_replace('/.[^.]*$/', '', $_FILES[$k]["name"])));
}
}
?>
if there are any files being uploaded, it will automatically parse each one to convert the file name using strtolower, str_replace and the preg_replace functions