PHP mailer , attachment not found/detected - so, email not sent -


I've added the code to my own form but I have this error:

"Someone Attachment not found ".

I am not a developer, so when I talk about the code, I'm a bit confused, sorry for this: (

This is my code:

& lt; / label & gt; Input type = "file" class = "Validate [ Required, custom [cv]] "name =" cv "class =" cv "value =" vote cv au format pdf or word undermining "/>

and code reception: $ permission X $$$ (".", "Doc", "pdf"); $ temp = explosion (".", $ _FILES ["cv"] ["name"] ("$ $ _FILES [" cv "] [" Type "Type" "Type"] == "Application / MS Word") & amp; amp; in_array ($ Extension, $ Permission Received)) {if ($ _FILES ["cv"] ["Error" ]> 0) {echo "& lt; Script & gt; Alert ('error:'. $ _FILES ["cv"] ["error"]. "') & Lt; / script & gt;";} from el $ {$ d =' Telechargement / implause / cv / '; $ De = $ d basename ($ _ files ['cv'] ['name']); Move_uploaded_file ($ _ files ["cv"] ["tmp_name"], $ de); $ FileName = $ _FILES ['cv'] ['name']; $ FilePath = $ _FILES ['cv'] ['tmp_name']; // if the file is uploaded then only add}} and {echo "script"; warning ('invalid file') "; } $ Mail = new PHPMailer (); $ Mail & gt; Ismail (); $ Mail & gt; AddReplyTo ($ _post ['email']); $ Mail & gt; AddAddress ($ EmailAddress); $ Mail & gt; SetFrom ($ _post ['email']); $ Mail- & gt; Subject = "Site Colin: Une Reposition A L 'Off Day" .mb_strtolower ($ _ POST [' Job ']). ""; $ Mail- & gt; AddAttachment ($ _ files ['cv'] ['tmp_name'], $ _FILES ['cv'] ['' name ']);

For me, there is no error, so I did not understand why the file is not detected during the post.

Can anyone help me?

Thank you very much!

The problem is in your HTML form. You are not allowing the user to select a file because the data is witch Already fill up the value field does not have a file value = "Voter CV AU format PDF word uniquidation".

It should look something

  & lt; Input type = "file" name = "cv" />  

In this way your post will have a CV field with the value of the file path.

Do not forget to encrypt = "multipart / form-data" in your form.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -