Attachments not sent using php mail() function

前端 未结 4 1214

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

4条回答
  •  盖世英雄少女心
    2021-01-28 02:16

    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.

提交回复
热议问题