-3

The PHP Code of send_form_email.php: http://pastebin.com/1W9vz7PP

The HTML Code of the Form http://pastebin.com/MKL4HDHV

It is sending the email but it doesn't contain the user entered date so for example it emails

First name:

Surname:

Date of Birth:

1 Answers1

3

You used

$email_message .= "First Name: ".($first_name)."\n";
$email_message .= "Surname: ".($second_name)."\n";
$email_message .= "Date of Birth: ".clean_string($dob)."\n";

Use $_POST for retrieve data

$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";

Same for rest of fields as well and it will work for you.

Mihir Bhatt
  • 3,019
  • 2
  • 37
  • 41