Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/03/2013, 12:38
nuria1254
 
Fecha de Ingreso: enero-2012
Mensajes: 30
Antigüedad: 12 años, 3 meses
Puntos: 1
Respuesta: recibo correos vacios php

Que modificacion tendria q hacer?

mi formulario es:
<form method="POST" action="enviar.php" onSubmit="return validarform(this)" name="Forma">

<div align="center">
<table border="0" width="63%" cellspacing="0" cellpadding="0">
<tr>
<td width="45%" align="right">
<p style="margin-right: 10px; margin-top: 0; margin-bottom: 0">
<font face="Tahoma" size="2">Asunto</font></td>
<td width="55%">
<p style="margin-top: 0; margin-bottom: 0">
<input type="text" name="asunto" size="26" style="font-family: Tahoma; font-size: 8pt; width:140; height:20"></td>
</tr>
<tr>
<td width="45%" align="right">
<p style="margin-right: 10px; margin-top: 0; margin-bottom: 0">
<font face="Tahoma" size="2">Nombre</font></td>
<td width="55%">
<p style="margin-top: 0; margin-bottom: 0">
<input type="text" name="nombre" size="26" style="font-family: Tahoma; font-size: 8pt; width:140; height:20"></td>
</tr>
<tr>
<td align="right"><p style="margin-right: 10px; margin-top: 0; margin-bottom: 0"> <font face="Tahoma" size="2">Telefono</font></td>
<td><p style="margin-top: 0; margin-bottom: 0">
<input name="tel" type="text" id="tel" style="font-family: Tahoma; font-size: 8pt; width:140; height:20" size="26">
</td>
</tr>

<tr>
<td width="45%" align="right">
<p style="margin-right: 10px; margin-top: 0; margin-bottom: 0">
<font face="Tahoma" size="2">E-Mail</font></td>
<td width="55%">
<p style="margin-top: 0; margin-bottom: 0">
<input type="text" name="email" size="26" style="font-family: Tahoma; font-size: 8pt; width:140; height:20"></td>
</tr>
<tr>
<td valign="top" colspan="2">
<p align="center" style="margin-right: 10px; margin-top: 0; margin-bottom: 0">
<font face="Tahoma" size="2">Comentario</font></td>
</tr>
<tr>
<td valign="top" colspan="2">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<textarea rows="8" name="comentario" cols="46" style="font-family: Tahoma; font-size: 8pt; width:243; height:49"></textarea></td>
</tr>
</table>
</div>

enviar:
<?php
$to = "Prueba <[email protected]>";
$subject = $_POST['asunto'];
$nombre = $_POST['nombre'];
$telefono = $_POST['tel'];
$from = $_POST['email'];
$mensaje = $_POST['comentario'];

$hoy = date ("d F Y");

$message = "\t\t\t$hoy\n\n";

$message = $message . "Asunto: $subject\n";
$message = $message . "E-Mail: $from\n";
$message = $message . "Nombre: $nombre\n";
$message = $message . "Telefono: $telefono\n";
$message = $message . "Comentario: $mensaje\n\n";

$headers = "From: $Nombre <$from>\r\n";
$headers .= "Reply-To: $Nombre <$from>\r\n";

if ( mail($to,$subject,$message,$headers) )
{
Header("Location: enviado.htm");
}
else
{
Header("Location: error.htm");
}
?>


mil gracias