Solved

Send form in body of email

Posted on 2004-04-07
5
134 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
ID: 10780574
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
ID: 10780580
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
ID: 10782052
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set email body to html using vbscript 6 41
two div layout one vertical other horizontal. 5 24
How to get this page layout correct 13 29
paypal ipn url 5 53
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
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)

786 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