Attach a file in php

Hello Friends,
please help me.

there is a question?
please tell me how i can make a function which can help me to attach a file from a html form.

How to attach PDF to email using PHP mail function?

Thank you for helping me in advance.


I advise using SwiftMailer ( Its very easy to install and it has great documentation.