D
D
Dmitry2018-09-05 23:18:55
PHP
Dmitry, 2018-09-05 23:18:55

PHPMailer + Ajax - submitting a form with attachments?

Hello!
I use this code:

for ($i=0; $i < count($_FILES['attachment']['tmp_name']); $i++) { 
   $mail->addAttachment($_FILES['attachment']['tmp_name'][$i], $_FILES['attachment']['name'][$i]);
}

<input type="file" class="field-file" name="attachment[]" multiple>

Everything is working. But with the use of Ajax, this method is no longer suitable. How to be in that case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2018-09-05
@devspec

Banned on google?
Tyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question