Solved

Online Form - Ataching Images

Posted on 2001-08-19
9
200 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

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 …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

739 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