Home › Forums › Back End › Attaching a File to a Form › Re: Attaching a File to a Form
Hi, Here to post my code as requested.
The form looks like this. Nothing special I’m sure you’ll agree.
The processing PHP bit looks like this
Where I have "THIS IS MY SERVER PATH" you need to add in the actual path to your upload folder on your server. I’m sure you already know this but here we are in any case.
I have found the best way to find it is to force a PHP error say by removing a ; and the running the script. The path is output on the error page.
Incidentally I have just tested this and it worked fine for a .doc file. Uploaded it then I FTP’d it back to my machine and opened it without a problem.
If this doesn’t work then you may have to start looking at your server setup. I’m not expert with the setup but that may be where the problem lies.