Hi!
I'm trying to get customer information through an html form (text field) to my e-mail, but all I get is empty e-mails. I've checked the variables. The variables are taken from the html and are used in php script, both in lowercase format.
Here's my script:
<?php
$firstname = HTMLSpecialChars($firstname);
$lastname = HTMLSpecialChars($lastname);
$email = HTMLSpecialChars($email);
$address = HTMLSpecialChars($address);
$city = HTMLSpecialChars($city);
$zipcode = HTMLSpecialChars($zipcode);
$phone = HTMLSpecialChars($phone);
$textarea = HTMLSpecialChars($textarea);
$email = strtolower($email);
$mail_to = "
[email protected]";
$mail_subject = "Customer info";
$mail_body = "$firstname \n";
$mail_body .= "$lastname\n";
$mail_body .= "$email \n";
$mail_body .= "$address \n";
$mail_body .= "$city \n";
$mail_body .= "$zipcode \n";
$mail_body .= "$phone \n";
$mail_body .= "$textarea \n";
if (mail($mail_to, $mail_subject, $mail_body))
echo "Success. Thank you!";
else echo "No success. Return and try again. Thank you!";
?>
Please help me solve this.
Thanx many times,
Teo