Dot in regular expression has a special meaning - any single character. If you have to use regular expressions, use [man]preg_match[/man] as manual says it's faster.
//this means treat dot literally and find '.pdf' at the end of the string
if (preg_match('/\.pdf$/',$_FILES['upfile']['name'])) //go ahead
else //print error message
Or use built-in functions for checking file exetension:
// Check Entension
$extension = pathinfo($_FILES['upfile']['name']);
$extension = $extension['extension'];
if ($extension == "pdf") //go ahead
else //print error message
see if either of those work for you.