you can connect directly to a remote mysql db by using its ip or hostname.
as for your upload. im pretty sure you'll need the upload script on the same server the file is to be uploaded to.
as for forms, you can point them wherever you like. i could point a form on my site to a script on yours.