Solved

Send form in body of email

Posted on 2004-04-07
5
132 Views
Last Modified: 2010-04-09
Hello,
I would like to create a form with several fields in an email rather than a link to a web page with a form.

1: Is it possible to have the recipient fill in the form directly in the email and click submit and have the form emailed back?
2: If so, I would I collect the results, as an email attchment or can they be written to a DB like my SQL on a webserver and perhaps the email can notify me of a form submission.

3: Can you provide an example of what needs to be done please.
form fields: Name [textbox], Phone [textbox], Info Pack [dropdown with option 1, 2 and 3] and submit button.
mailto: example@example.com
Mysql db name: example_db [have only create the bd on the server]
domain: www.mydomain.com

Thank you for your assistance.
[html&DB newbee]
0
Comment
Question by:Tlogix
  • 2
5 Comments
 

Expert Comment

by:Halluzination
Comment Utility
Sure, TLogix.  

Put this code into a standard HTML file and open it.  

----------------------------------------------------------------------
<HTML>
<BODY>
<FORM METHOD=POST ENCTYPE="text/plain" ACTION="mailto:example@example.com?subject=New Order">

Name:<INPUT TYPE="text" NAME="Name"><BR>
Phone:<INPUT TYPE="text" NAME="Phone"><BR>
Info Pack:<SELECT NAME="Infopack">
<OPTION VALUE="Option 1">Option 1
<OPTION VALUE="Option 2">Option 2
<OPTION VALUE="Option 3">Option 3
</SELECT><BR>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>
</BODY>
</HTML>

----------------------------------------------------------------------------------------------------------------------------------

An example email you would recieve would be:

Name=example
Phone=1234567890
Infopack=Option1

---------------------------------------------------------

Hope that helps!




0
 

Accepted Solution

by:
Halluzination earned 50 total points
Comment Utility
By the way, if you want to send that page via email, make sure your email provider has HTML compatability and copy and paste that into your email.  Cheers!
0
 
LVL 17

Assisted Solution

by:dorward
dorward earned 50 total points
Comment Utility
I very strongly suggest that you do not try to embed forms inside HTML formatted emails. The handling of HTML email between mail clients is rather variable, and you are likely to find that they fail quite frequently.

As for mailto: as a form action... http://www.isolani.co.uk/articles/mailto.html

If you still want to go ahead with this, you need two things.

(1) A real form handler to put at a URL you have in your action attribute. This is written in the language of your choice. My preference would be Perl, many people are happier with PHP, some people even like ASP (and there are other options).

(2) The HTML formatted email. Again, this depends on the language you are working in, my choice would still be Perl. http://perl.about.com/library/weekly/aa042302c.htm
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

771 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

10 Experts available now in Live!

Get 1:1 Help Now