hedokda
01-12-2010, 05:53 PM
Hello... I need some help with my PHP email form!
Everything is working fine but I have Special Characters (ç, ã, õ, é, ect.) in the Subject field that don´t seem to be appearing, but in the body it appears.
can anyone help???
here's my code:
<?php
if($_POST['name'] == "") {
echo "Please Insert Name:";
} elseif($_POST['email'] == "") {
echo "Please Insert Email";
} else {
if(isset($_POST['submit'])) {
$to = "
h.fialho@endbox.com";
$subject = "Form Solicito Informação";
$subject2 = "É Obrigação";
$name = $_POST['name'];
$email = $_POST['email'];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $email\r\n";
$headers .= "Reply-To: $email\r\n";
$headers2 = "MIME-Version: 1.0\r\n";
$headers2 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers2 .= "From: $to\r\n";
$headers2 .= "Reply-To: $to\r\n";
$body = "Name:<br />
$name\n</p>
<p>E-mail:<br />
$email\n</p>";
$body2 = "<p>Agradecemos o seu interesse.</p>";
mail($to, $subject, $body, $headers2);
mail($email, $subject2, $body2, $headers);
} else {
echo "blarg!";
}
header("Location: thank_you.php");
}?>
Thank you however help´s...Goodbye
Everything is working fine but I have Special Characters (ç, ã, õ, é, ect.) in the Subject field that don´t seem to be appearing, but in the body it appears.
can anyone help???
here's my code:
<?php
if($_POST['name'] == "") {
echo "Please Insert Name:";
} elseif($_POST['email'] == "") {
echo "Please Insert Email";
} else {
if(isset($_POST['submit'])) {
$to = "
h.fialho@endbox.com";
$subject = "Form Solicito Informação";
$subject2 = "É Obrigação";
$name = $_POST['name'];
$email = $_POST['email'];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $email\r\n";
$headers .= "Reply-To: $email\r\n";
$headers2 = "MIME-Version: 1.0\r\n";
$headers2 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers2 .= "From: $to\r\n";
$headers2 .= "Reply-To: $to\r\n";
$body = "Name:<br />
$name\n</p>
<p>E-mail:<br />
$email\n</p>";
$body2 = "<p>Agradecemos o seu interesse.</p>";
mail($to, $subject, $body, $headers2);
mail($email, $subject2, $body2, $headers);
} else {
echo "blarg!";
}
header("Location: thank_you.php");
}?>
Thank you however help´s...Goodbye