I\'m working on file attachment here. The mail function is working fine other than the file field is empty. I have tried using Content-Type: multipart/mixed
and som
There are several issues here. The primary issue is that this code is a security nightmare and should never be deployed anywhere.
The second issue is checking if your arguments are populated before trying to use them to instantiate other variables. When you assign $upload and then make a check for $_POST data and only then see if the $_POST argument was even set in the first place, it suggests you need to re-read the isset() documentation and even the fundamentals of conditional statements.