send_form_email.php的PHP代码: http://pastebin.com/1W9vz7PP
表单的HTML代码 http://pastebin.com/MKL4HDHV
它正在发送电子邮件,但它不包含用户输入的日期,例如它通过电子邮件发送
名字:
姓:
出生日期:
答案 0 :(得分:3)
您使用了
$email_message .= "First Name: ".($first_name)."\n";
$email_message .= "Surname: ".($second_name)."\n";
$email_message .= "Date of Birth: ".clean_string($dob)."\n";
使用$ _POST检索数据
$email_message .= "First Name: ".($_POST['first_name'])."\n";
$email_message .= "Surname: ".($_POST['second_name'])."\n";
$email_message .= "Date of Birth: ".clean_string($_POST['dob'])."\n";
同样适用于其他领域,它也适合你。