How do I make an upload form work alongside the normal sending of form fields to an email address?

Hi there. I am new here. Please assist urgently. I have attached the screenshot of the php code here.

What happens when you run it? In what way is it not working?

It brings up the error message “'Message failed. Please, send an email to moyadairo@xxxx.com

This is the second part of the code has been attached also.

Using the persons first-name as the email from-address might be causing a problem with your mail server - it might require that the email is sent from a valid, configured email address for all sorts of reasons - has it ever sent the email correctly?

The form upload part appears after you’ve executed the javascript window.location() call, which I assume (I don’t really know js) redirects the page before it hits the code in your first screen-shot, guessing that the first screen-shot (from the line numbers) appears after the second one.

Yes it has sent the email many times before. Here’s what I am thinking might be wrong.

Please disregard the code I have here. Take a look at this.

//code to process file upload [line 42]
Can you help me generate a code that just processes file upload.

Well, that code you posted does a basic file upload, including checking the size and making sure it’s a .doc or .docx file. What happens when you run it?

Images are nice to look at. Unfortunately I don’t have an OCR, I can’t paste the code into my text editor, I have trouble reading code in an image, and (sorry) I’m not up to hand-typing it.

Any chance you can post the code here like this? {those are 3 backticks on their own lines)

```
code here
```

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.