Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/12/2013, 17:50
Arkhamb
 
Fecha de Ingreso: diciembre-2012
Mensajes: 21
Antigüedad: 11 años, 4 meses
Puntos: 0
Respuesta: Problema .PHP y formulario

Gracias por responder tan rápido TSG!

aquí el codigo del formulario:

Cita:
<form id="form1" name="form1" method="post" action="http://www.sundaysummer.info/send.php">
<table width="459" border="0">
<tr>
<th width="115" scope="col"><div align="right">Nombre:</div></th>
<th width="339" scope="col"><div align="left">
<input name="Nombre" type="text" id="Nombre" />
</div></th>
</tr>
<tr>
<td><div align="right"><strong>E-mail:</strong></div></td>
<td><input name="Email" type="text" id="Email" /></td>
</tr>
<tr>
<td><div align="right"><strong>Asunto: </strong></div></td>
<td><input name="Asunto" type="text" id="Asunto" /></td>
</tr>
<tr>
<td><div align="right">
<p><strong>Mensaje:</strong></p>
</div></td>
<td><p>
<textarea name="Mensaje" cols="45" rows="12" id="Mensaje"></textarea>
<center><input name="Enviar" type="submit" id="Enviar" value="Enviar" />
<input name="Borrar" type="reset" id="Borrar" value="Borrar" /></center>
</p>
</td>
</tr>
</table>
</form>
Por lo que veo "action" contiene la dirección del archivo .PHP, no sé si será correcto. Tambien el codigo de send.php:

Cita:
<?php
$Nombre = $_POST['Nombre'];
$Email = $_POST['Email'];
$Asunto = $_POST['Asunto'];

$header = 'From: ' . $Email . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";

$mensaje = "Este mensaje fue enviado por " . $Nombre . ", y el asunto es " . $Asunto . " \r\n";
$mensaje .= "Su e-mail es: " . $Email . " \r\n";
$mensaje .= "Mensaje: " . $_POST['Mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date("d/m/y \a \l\a\s H:i:s ");

$para = '[email protected]';
$asunto = 'Contacto desde Sunday Summer';

mail($para, $asunto, utf8_decode($mensaje), $header);

echo "Su mensaje a sido enviado correctamente" ;
header("Location:http://www.sundaysummer.info/contacto2.html");

?>
Saludos y muchas gracias!