简体   繁体   中英

How do I submit a form to a database from an email?

I am trying to figure out how I can email a form to someone and have them fill it out and submit it directly from the email to be entered into a MySql database via PHP. I have read that this is possible, but I have not seen any code on how to make this happen. I am now looking at MIME standards for emailing the form. I don't know if that is even the right way to go. Can anyone offer me a direction on this with some instruction?

The method you are suggesting sounds very difficult to implement. I think the approach you want is to create an online web form for them to fill out, and have the data be stored in a MySQL database. Then you can just e-mail the link to the form to the people who should have it.

Parsing MIME formatted e-mail is a pain in the ass, and often doesn't work right. Avoid it if at all possible.

Don't.

HTML support in email clients is not as good as it is in web browsers. They are particularly poor for HTML form support.

Host the form on the WWW instead. Include a link to it in the email.

http://www.campaignmonitor.com/blog/post/2435/how-forms-perform-in-html-emai/

Theoretically, creating a web form in an Email that submits to a web-based PHP handler script (which stores the responses in a database) is identical to creating a form on a web site.

However, as you can see at the URL above, not all Email clients support HTML forms. Many users may also be wary of submitting a form within an Email message, because there's no telling where its really going to take you.

You may have also noticed that it's very easy to click on a link ;) why not just put a link in the email that takes the user to a form on your website?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM