?
Solved

Online Form - Ataching Images

Posted on 2001-08-19
9
Medium Priority
?
226 Views
Last Modified: 2013-12-25
Hi,

I have a standard contact form on my webpage which allows input such as name, address, email. When the user presses SUBMIT these details are sent to my email address.

However I would like to add in functionality which allows the users to browse to image files on their Hard Disk and send them to my email address along with the other information. This would work much like the "attatchment" feature in hotmail which lets you browse to a file and attach it to the email.

How would I do this?

Thanks,

Neil

0
Comment
Question by:homersim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 8

Expert Comment

by:bebonham
ID: 6404311
can you post the script you are currently using now, so we can get an idea of what you are after?


however, to get optimal results without a lot of code, you will need to be sure and have the module MIME::Lite installed on your server

if you have that module installed, I have a simple solution.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6404477
<FORM METHOD="POST"  ENCTYPE="multipart/form-data">
  <INPUT NAME="uploadfile"  TYPE="file"  VALUE="">
</FORM>
0
 
LVL 8

Accepted Solution

by:
jhurst earned 600 total points
ID: 6420591
ahoffman is on the right track.  You need the TYPE="file" and the ENCTYPE, problem is that this will not work with a direct send to mail.

Hotmail, which you want to emulate actually receives this form with a cgi and then converts this to the required data.  You will need to do the same.  It is not hard.

I could attempt to explain the format of the file that you will receive but realistically you would be much better to just write a simple script that accepts the data and dumps it to file first.  Then look at the file.  When you look at this file the way in which the TYPE="FILE" data is stored will be obvious.

0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6420795
> ..user presses SUBMIT these details are sent to my email address.

oops, missed that.
Therfore <a href=mailto: ...> is used, it spawns a application specified by the user (respectively his browser and/or OS) which is responsible for browsing the local filesystem.
Probably a Java-applet can do what you want
0
 
LVL 8

Expert Comment

by:jhurst
ID: 6422681
Problem with <a href=mailto... is that it just does invokes the mailer and does not interact with the form, sadly.

I do agree that a Java Applet can do it but it would be easier and more general since at this point we are writing code, to do it server side.  Remember that a lot of people disable Java and worse, windows XP comes without Java support at all.

0
 
LVL 16

Expert Comment

by:maneshr
ID: 6628114
homersim,

Did you get the solution you were looking for?

What solution, if any, did you use?

Please let us know.

Thanks,
0
 
LVL 16

Expert Comment

by:maneshr
ID: 6654401
homersim,

Did you get the solution you were looking for??

What solution, if any, did you use??

Pl. let us know.

NOTE: if you have found a solution on your own or if this question has become obsolete, please delete  it and free up your points.

Thanks,
0
 
LVL 16

Expert Comment

by:maneshr
ID: 6675226
homersim,

                     Did you get the solution you were looking for??

                     What solution, if any, did you use??

                     Pl. let us know.

                     NOTE: if you have found a solution on your own or if this question has become obsolete, please delete
                      it and free up your points.

                     Thanks,
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6699244
Last login was August; apparently abandoned.  Proposed answer was not rejected, assume it served and closing.
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question