By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

Email Form with Attachments..

P: n/a
I'm using the McFedries email form, and I can't seem to get an upload
form to work. Instead of it saving to my server, I want it to send the
information and the picture to my email. Here is the html for my form.
If anyone could help, that'd be greatly appreciated.
<form action="http://www.mcfedries.com/mailform/mailform.asp"
method="POST">
<input type=hidden name="MFAddress" value="My email address">
<input type=hidden name="MFCode" value="My 4 digit code MFCode">
<input type=hidden name="MFSubject" value="Band Application">
<input type=hidden name="MFReturn" value="My return URL">
<center><font color="#FFFFFF" size="1" face="Verdana"><b>Band Name:</b>
<input type="text" size="16" name="BandName" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF" size="1"
face="Verdana"><b>Email:</b><input type="email" size="16" name="Email"
style="font-family: Verdana; font-size: 10; background-color:#000000;
color: #FFFFFF; border-left: 2 inset #C00000; border-right: 2 inset
#C00000; border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></center>
<center><font color="#FFFFFF" size="1" face="Verdana"><b>Website:</b>
<input type="link" size="16" name="Website" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF" size="1"
face="Verdana"><b>Bio:</b></center>
<center><textarea name="Bio" rows="5" cols="35" wrap="VIRTUAL"
style="font-family: Verdana; font-size: 10; background-color:#000000;
color: #FFFFFF; border-left: 2 inset #C00000; border-right: 2 inset
#C00000; border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></textarea></center>
<center><font color="#FFFFFF" size="1"
face="Verdana"><b>Gear:</b></center>
<center><textarea name="Gear" rows="5" cols="35" wrap="VIRTUAL"
style="font-family: Verdana; font-size: 10; background-color:#000000;
color: #FFFFFF; border-left: 2 inset #C00000; border-right: 2 inset
#C00000; border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></textarea></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>Band Photo:</b>
<input type="file" size="16" name="Band Photo" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>Band Logo:</b>
<input type="file" size="16" name="Band Logo" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>Vocals:</b>
<input type="file" size="16" name="Vocals" style="font-family: Verdana;
font-size: 10; background-color:#000000; color: #FFFFFF; border-left: 2
inset #C00000; border-right: 2 inset #C00000; border-top: 2 inset
#C00000; border-bottom: 2 inset #C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>L. Guitar:</b>
<input type="file" size="16" name="L. Guitar" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>R. Guitar:</b>
<input type="file" size="16" name="R. Guitar" style="font-family:
Verdana; font-size: 10; background-color:#000000; color: #FFFFFF;
border-left: 2 inset #C00000; border-right: 2 inset #C00000;
border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>Bass:</b>
<input type="file" size="16" name="Bass" style="font-family: Verdana;
font-size: 10; background-color:#000000; color: #FFFFFF; border-left: 2
inset #C00000; border-right: 2 inset #C00000; border-top: 2 inset
#C00000; border-bottom: 2 inset #C00000"></font></center>
<center><font color="#FFFFFF"size="1" face="Verdana"><b>Drums:</b>
<input type="file" size="16" name="Drums" style="font-family: Verdana;
font-size: 10; background-color:#000000; color: #FFFFFF; border-left: 2
inset #C00000; border-right: 2 inset #C00000; border-top: 2 inset
#C00000; border-bottom: 2 inset #C00000"></font></center>
<center><INPUT TYPE=SUBMIT VALUE="Submit" style="font-family: Verdana;
font-size: 10; background-color: #000000; color: #C00000; border: 2
inset #C00000">
</FORM>
</form>
It just seems to show up as C:/My Pictures/.... etc.. Is there any way
to make this work?

Jul 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I mean.. everything else works, it's just the picture upload that
doesn't. All the text shows up, but the picture doesnt. It just has the
images path from my local system.

Jul 25 '06 #2

P: n/a
al**********@hotmail.com <al**********@hotmail.comscripsit:
I'm using the McFedries email form,
It's probably unknown to most people here, and perhaps its documentation
isn't even publicly accessible; at least you gave no reference to it.
Anyway, in your reply to your own message, you describe the problem as
follows: "I mean.. everything else works, it's just the picture upload that
doesn't. All the text shows up, but the picture doesnt. It just has the
images path from my local system."

As usual, you should have posted the URL of the problem page (instead of a
bulky snippet of code, which may well contain copying errors). In this case,
however, things look rather obvious. Your form contains a file field:
<input type="file" size="16" name="Band Photo"
style="font-family: Verdana; font-size: 10; background-color:#000000;
color: #FFFFFF; border-left: 2 inset #C00000; border-right: 2 inset
#C00000; border-top: 2 inset #C00000; border-bottom: 2 inset
#C00000">
The style attribute specifies a rather odd styling for the field, using
malformed CSS too. It is generally a bad idea to distort the default
rendering of form fields, _especially_ for rarely used types such as file
input. Besides, the size attribute should have a larger value so that the
box can contain a typical path name of a field.

The main point, however, is that file input requires that
a) the <formtag has enctype="multipart/form-data"
b) the form handler (on the server) is capable of handling such an encoding
of form data, _including_ a file field appearing inside it.
Most of the simple form handlers for sending form data by E-mail have
nothing resembling such functionality. So you probably need a different form
handler, and this may even require the use of another Internet Service
Provider, or a different kind of contract with your ISP, or a remotely
hosted service. Naturally, you should _first_ check the documentation of the
form handler you are using now; it _might_ have the required functionality.

More info: http://www.cs.tut.fi/~jkorpela/forms/file.html
It just seems to show up as C:/My Pictures/.... etc..
That's a typical symptom of the problem.

P.S. Your code also contains <input type="link" ...>, which is syntactically
malformed: there is no such value defined for the type attribute. Check what
you really meant by that. (Browsers probably ignore the attribute,
defaulting to type="text".)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jul 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.