View Full Version : HTML code for form

11-28-2005, 01:07 AM
I'm trying to create a simple HTML form that will allow a user to submit a picture through the form. I don't want the form to be uploaded to my server, but just sent as an attachment through the email the form creates. Since I'm using a free hosting service, I cannot use my own CGI/Perl Codes. Is it possible to make this for work? Here is what I have so far:
<FORM ACTION="/bin/script_library/form_handler_mail" METHOD=post enctype="multipart/form-data" >
What's your name?
<INPUT TYPE="text" NAME="name"><BR>
What's yout email address?
<INPUT TYPE="text" NAME="email">
Send my picture:<br />
<input name="userfile[]" type="file" /><br />
<input type="submit" value="Send files" />
This is what I get back:
The following data was submitted via your form:

email: dfdfd
name: asas
userfile[]: C:\Documents and Settings\Owner\Desktop\favicon.ico

I can see the path and filename, but nothing is attached. I definitely appreciate any help I can get.

11-28-2005, 01:09 AM
Just because you use the file input doesn't mean it gets attached. You will actually NEED a script that can accept attachments. You might be able to find one on www.hotscripts.com

11-28-2005, 02:02 AM
I took a look at the CGI/Perl Form Processor scripts on hotscripts.com and think I'm worse now then before I started. I'm very new at scripts. Simple HTML form and I'm golden, but this is new. I just need to know what it will take to make this form work. Sever side isn't something I've had to deal with since I've only dealt with free webhosting. If anyone can point me in the right direction, I sure would appreciate it.

11-28-2005, 05:15 AM
You might want to read this article (http://www.sitepoint.com/article/advanced-email-php). The script that is discussed in it can be downloaded. Works great!