what you need to do is get the User name into a var say "$strUserName"
and also get the extension for the file
$arrExtensions = array(".doc", ".jpg", ".jpeg", ".gif", ".png");
if( !in_array(strtolower($fileExtension), $arrExtensions))
{
echo "Invalid file type";
die();
}
$strFileName = $strUserName . "." . $strFileExt;
// Make the destination Path
$strDestFile = $strpDestPath . "/" . $strFileName;
if ( move_uploaded_file ($_FILES['resume']['tmp_name'] , $strDestFile ) )
{
chmod($strDestFile,0755);
}
else
{
echo "$strDestFile : Failed to open stream : Permission denied.";
die();
}
hope this will help you.....