Solved

Online Form - Ataching Images

Posted on 2001-08-19
9
196 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 150 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

762 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