PDA

View Full Version : E-Mail Forms



djfox
01-27-2004, 01:39 PM
I`ve got a working e-mail form going where users can edit pictures they have already sent to the site. I currently use a free e-mail form service for them to send in pictures BUT it has a limitation, the users cna only fill out that form 10 times!

So I wanted to make a picture submission form myself but am having toruble getting the bloody thing to send me the picture. The code currently:

<FORM NAME=Tools3 ACTION="mailto:DJFox@comcast.net?subject=Upload Image" METHOD="post" ENCTYPE="text/plain">
<INPUT NAME=" " TYPE=TEXT VALUE="Your Name" SIZE="" MAXLENGTH="50">


E-mail Address to contact you by:

<INPUT NAME="E-mail" TYPE=TEXT VALUE="" SIZE="">


Picture:

<INPUT NAME="filename" SIZE=50 TYPE=FILE>



<INPUT NAME="Submit" TYPE=SUBMIT VALUE="Submit"><INPUT NAME="Cancel" TYPE=RESET VALUE="Cancel"></FORM>

All I get is either an e-mail message that says "filename=C:\A_Website\New\load\thumbnail_211.jpg" instead of an attached picture or an e-mail with an attachment POSTDATA.ATT that is totally unreadable.

Anyone how to fix this problem & make it so it send the picture as attachment along with the field info properly?

southplatte
02-02-2004, 02:35 AM
I will try to help a little bit:

The first line catches my attention -- ENCTYPE="text/plain" yet the pictures will not be text, they will be a different mime type (jpg, gif etc).

When the form gets submitted, I would take a gander that the postdata.att is the picture converted to text which is unreadable.

You can try to take the ENCTYPE out or maybe specify more than one type and test it.

As far as getting the form to set the picture as an attachement, I am not aware of a way for a mailto for to perform this (anyone else know for sure?). You may need to look at a server side scripting language to help out with the form to accomplish this.

djfox
02-02-2004, 02:39 AM
With the SSS script you mentioned, are you referring to the file being saved as a shtml? I do have the file saved as shtml.

I`ll try your suggestion with the enctype & see how that goes. :)

southplatte
02-02-2004, 03:13 AM
Right, the page itself is saved as a .shtml for the SSI that you use in the form, however I was thinking along the lines of a PHP or ASP script or possibly even javascript.

PHP has a built in mail() function that might be able to handle attachments - I can look into it if you want. I am sure ASP has something similar as well. JavaScript may be the better one because your host needs to be able to support the PHP/ASP languages and JavaScript is more client side.

PHP also can use the include() function to get the same results as the SSI include you are using.