Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/08/2004, 18:59
svera
 
Fecha de Ingreso: agosto-2004
Ubicación: Chile
Mensajes: 10
Antigüedad: 19 años, 8 meses
Puntos: 0
ayuda!!! email html

hola, soy nuevo en el tema de PHP, y para mi sitio estoy creando la generacion de email de respuesta en formato html, mi problema es que recibo las vars desde flash y al armar el html y poner la var del nombre si este tiene acento , al recibir el email me aparecen todos los acentos asi= ó y en la base de datos tambien queda asi. este es el script del php a ver si me pueden ayudar, necesito urgente poder terminarlo y este es el ultimo detalle ....que veo. supongo...

script:

<?php
$cone =mysql_connect('localhost','user','password');
mysql_select_db('mibd');
//recoge
$nombre = $_POST['nombre'];
$nombreb = $_POST['nombreb'];
$apellido=$_POST['apellido'];
$empresa=$_POST['empresa'];
$cargo=$_POST['cargo'];
$fono=$_POST['fono'];
$email = $_POST['email'];
$comentario=$_POST['comentario'];
$fecha= time();
$idioma=$_POST['idioma'];

$sql = "INSERT INTO Contactos SET
Nombre='$nombre',
Apellido='$apellido',
Empresa='$empresa',
Cargo='$cargo',
Fono='$fono',
Email='$email',
Comentario='$comentario',
Fecha='$fecha',
Idioma='$idioma'";


if (@mysql_query($sql)) {
$status="ok";
echo "stat=" .$status. "&nom=" .$nombre."&ema=" .$email."&empre=" .$empresa."&fon=" .$fono."&";

$to=$email;

/* subject */
$subject = "Información recibida";
/* message */
$message = '
<html>
<head>
</head>
<body>
<div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="emailtop.jpg" width="544" height="64"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"><div align="center">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><p><font face="Arial" size="2">Estimado: '.$nombre.'</font></p></td>
</tr>
<tr>
<td><p><font face="Arial" size="2">He recibido tu informaci&oacute;n, estar&eacute; cont&aacute;ctandome contigo a la brevedad. </font></p></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#EEEEEE">&nbsp;</td>
</tr>
<tr>
<td><img src="emailbot.gif" width="544" height="2"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"><p align="right"><font face="Arial" size="1">www</font></td>
</tr>
</table>
</div>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
//$headers .= "To: [email protected]\r\n";
$headers .= "From: [email protected]\r\n";
$headers .= "Bcc: [email protected]\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);
///fin
} else {
//$status=.mysql_error();
$status="mal";
echo "stat=" .$status. "&nom=" .$nombre."&ema=".$email."&";
}
?>