I'm using the above code instead of php. It works properly, and I'm getting the form to send me email.
Now, I need to include a file upload option. And I want the file to be sent along with the rest of the information in the contact form. Is this possible?
I haven't really started messing around too much, but here are some dilemmas that I know I'll be facing.
1. Nesting Forms are not allowed. So, how do I send file along with the rest of the contact form?
2. I'm not using php, but a specific form method provided by Yahoo. I'm certain I would have to use php to get this done, so I need to somehow incorporate both.
I did manage to find a css/html combo online with an upload option that lets me send file along with contact form, but I'm not receiving the file, just the name of the file.
First check is your Yahoo form builder allows you to add a "file" field to your form.
If not them you will not be able to upload a file even if you modified the HTML of your form.
Judging by your form tag, it appear it's setup to just send text information to the email address appearing in the action attribute: firstname.lastname@example.org
To upload a file,
* first add a file field to our form that allows the end user to select the file to upload from her computer
<input type="file" name="myfile">
* Then you need to add the encoding type to your form tag
<form method=post action="http://email@example.com&confirm=confirmation.html&error=error.html" enctype="multipart/form-data">
* To receive the file by email, the server-side script has to actually capture the file's data, encode it to be added to the email sent. If you do not receive any file then the sercer-side script is not setup for that heaving lifting.
Just think about it. You certainly don't want anyone visiting your website to be able to upload a file to your web hosting server. There are security risk there.
Unless it's a file sharing web site which takes extra precautions, will only allow certain type of files, and scans all incoming files as well then it's a bad idea to have file upload in a public site.