Solved

Send form in body of email

Posted on 2004-04-07
5
133 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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 code hide show and toggles. 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…

867 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