Solved

Online Form - Ataching Images

Posted on 2001-08-19
9
179 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
  • 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now