Let's say I have a form with 'file' type input control on it among other input controls.
My PHP emails the submitted form data somewhere.
As far as I know, in order to attach an uploaded from the form file to the email, I have to save it first in the temporary directory on the server and then attach it to the email from there.
Is this the only way to send a file as an email attachment with the rest of the form data?
Is there any better ways to do that?