Make sure your form has the right encoding type for an upload. This example is taken from the manual:
<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="__URL__" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
does this need the full path? ie http://www?
$conn_id = ftp_connect("site.org");
You might also want to look for the position of the . then get the extension from there, instead of taking the last 3 characters from the end. For instance, someones image file might have the .jpeg extension.
This would return jpe in this case.
$filetyp = substr($uploadfile, -3);
When you submit a file form, it populates the $_FILES superglobal array. From here you can access all the details you need. It seems you are making a copy of this array ($uploadfile) and passing it to the copy function. Really, you should use the move_upload_file, and pass it the appropriate $_FILE value.
$extension = substr(strtolower(strrchr($filename, ".")), 1);
Have a read on the manual