Solved

Send form in body of email

Posted on 2004-04-07
5
136 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

710 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