Mail sends only some data

Mail is only returning email and phone number. Text1 and Text2 do not come through. I have used First Name and last name in the collection and send but still the first 2 fields do not show in the send mail. Here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>

$to= ''; 

$message= "FirstName   ". $Var1 .  "\r\n"  ."LastName  ". $Var2 .   "\r\n"   .  "Email   ". $Email .   "\r\n"   .  "Phone   ". $Phone;

Echo  'Thanks for registering. See You Soon!';



None of these are correct. It’s $_POST not $_Post, and name your variables appropriately so that they actually make sense. $Var1 and Text2 make zero sense to what they should be.

Also it’s unclear why you even copy the values to other variables, i would recommend to use sprintf with a list of POST parameters, for readability.

Sponsor our Newsletter | Privacy Policy | Terms of Service