Php 如何将电子邮件地址附加到w3resource表单验证示例

Php 如何将电子邮件地址附加到w3resource表单验证示例,php,forms,validation,server-side,mailer,Php,Forms,Validation,Server Side,Mailer,我最近在w3resource网站上读了一篇关于php表单验证的有趣文章,内容是关于如何通过php验证表单,但其中没有将数据发送到电子邮件地址的方法。以下代码来自下载的示例() 使用parsely.js进行表单验证 h1{页边距底部:20px} 输入,标签{页边距顶部:7px;页边距底部:7px;颜色:#000066;字体大小:18px;右侧填充:7px} 输入[type='checkbox']{左边距:5px} .注{颜色:#ff0000} .success_msg{color:#006600

我最近在w3resource网站上读了一篇关于php表单验证的有趣文章,内容是关于如何通过php验证表单,但其中没有将数据发送到电子邮件地址的方法。以下代码来自下载的示例()


使用parsely.js进行表单验证
h1{页边距底部:20px}
输入,标签{页边距顶部:7px;页边距底部:7px;颜色:#000066;字体大小:18px;右侧填充:7px}
输入[type='checkbox']{左边距:5px}
.注{颜色:#ff0000}
.success_msg{color:#006600}
旅游预订表
*表示强制运动

所以,给你,一步一步

Step 1: declare the mail address to whom you want to send mail.
Step 2: write subject of the mail. 
Step 3: collect data from POST so that you can write them to the body of mail. 
Step 4: declare the mail id from which the mail is coming. 
Step 5: sent mail with PHP mail() function.

您可以先使用该功能。邮件功能将走向何方?我使用了另一个邮箱的邮件功能,它可以工作,但是不管信息是否经过验证,信息都会被发送出去。
Step 1: declare the mail address to whom you want to send mail.
Step 2: write subject of the mail. 
Step 3: collect data from POST so that you can write them to the body of mail. 
Step 4: declare the mail id from which the mail is coming. 
Step 5: sent mail with PHP mail() function.