alguien me puede explciar por que al enviar un mensaje el texto de un textarea, me envia con caracteres especiales???... hago las respectivas conversiones y no realiza nada he probado alguna formas y nada....
Código HTML:
llevo dias y no se que puede estar mal no se que ocurre en el textarea...Ver original
<?php session_start(); ?>
<style type="text/css">
#formulariodecontacto{
font-family:"Times New Roman", Times, serif;
font-size:12px;
font-weight:normal;
color: #333;
}
#formulariodecontacto input {
font-size:12px;
color:#333;
}
</style>
<div id="formulariodecontacto">
<form action="" method="post">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<table align="center" >
<tr>
<td width="300">
<input type="radio" name="imagen" value="1" />
</td>
<td width="296">
<input type="radio" name="imagen" value="2" />
</td>
</tr>
</table>
<table width="600" border="0" align="center" cellpadding="2" cellspacing="0" style="font-size: 12.0pt; font-family: 'Cambria'; mso-ascii-theme-font: 'minor-latin'; mso-fareast-font-family: 'Times New Roman'; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: ES-TRAD; mso-fareast-language: ES; mso-bidi-language: AR-SA;color:#575757;">
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td>
<textarea name="mensaje" cols="45" rows="15">
Hola, acabo de recibir un servicio gratuito de purificacion de aire y descontaminación en mi hogar, además me indicaron como prevenir enfermedades graves, ¡fue realmente impresionante! Me otorgaron el derecho de obsequiar 4 de estos servicios a las familias que más aprecio y los escogá a ustedes. Por favor recibe la llamada en estos días para hacer una cita y me ayudas porque ganarán obsequio si los recibes.
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</form>
</div>
<?php
if (isset($_POST['action'])) {
//Mail del amigo
$dest = $_POST['email2'];
$copia1 = $_POST['email'];
$copia2 = "[email protected]";
//Encabezado mail - Nombre y mail del remitente
$head = "From: ".$_POST['nombres']."<".$_POST['email'].">\r\n";
$head .= "Content-type: text/html\r\n";
$asunto = $_POST['nombres']." te recomienda Sistemas Rainbow";
$email = $_POST['email'];
$template ='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body bgcolor="#666666">
<font color="#FFF">
<table width="600" border="0" align="center" bgcolor="#000">
<tr>
</tr>
<table width="600" border="0" align="center" bgcolor="#000">
<tr>
<td>
</td>
</tr>
<tr>
<td>
Los datos de tu amigo son:<br/>
<table>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body>
</html>';
// CAMPOS REQUERIDOS
if(empty($_POST['nombres'])) die("El campo Nombre Completo es requerido");
if(empty($_POST['email'])) die("El campo E-mail es requerido");
if(empty($_POST['mensaje'])) die("El campo Mensaje es requerido");
if(empty($_POST['imagen'])) die("El campo Imagen es requerido");
// VALIDAR EMAIL
function validarCorreo($email)
{
return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([a-z0-9]+[\.-])*[a-z0-9]+\.[a-z]{2,6}$',$email);
}
if(validarCorreo($email)) { }
else { die ('Su E-mail no es valido, verifiquelo e intentelo nuevamente.'); }
// CAPTCHA
include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';
$securimage = new Securimage();
if ($securimage->check($_POST['captcha_code']) == false) {
die('El codigo es incorrecto, intentelo nuevamente.');
}
// ENVIO DEL MENSAJE
if ($dest=$dest){
if (mail("$dest,$copia2", $asunto, $template, $head)) {
echo "Su mensaje fue enviado, pronto estaremos en contacto. Gracias.";
}
else {
echo "Error de envio, intentelo nuevamente.";
}
}
}
?>
 
  
 
 Envio Email no convierte caracteres espceciales
 Envio Email no convierte caracteres espceciales 


