Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2010, 20:52
giacco
 
Fecha de Ingreso: noviembre-2008
Ubicación: venezuela
Mensajes: 47
Antigüedad: 15 años, 6 meses
Puntos: 0
Busqueda Formulario de contactos en DW y php

hola amigos tengo un problema cree un formulario en dreamweaver y luego ise el php para que fuera enviado a mi correo. lo subi por ftp, pero cuando relleno el formulario y le digo enviar me muestra la pagina php. y el formulario nunca llega a mi correo.

la pagina HTLM la tengo denominada como pruebacontacto.htlm y la pagina php la denomine enviar.php

¿que estare haciendo mal?

este es el codigo HTLM del formulario


<form id="contacto"name="form1" method="post" action="enviar.php">
<label></label>
<table width="580">
<tr>
<td>Nombre</td>
<td><label>
<input name="Nombre" type="text" size="30">
</label></td>
</tr>
<tr>
<td><label>E-Mail</label></td>
<td><input name="E-Mail" type="text" size="30"></td>
</tr>
<tr>
<td><label>Empresa</label></td>
<td><label>
<input name="Empresa" type="text" size="40">
</label></td>
</tr>
<tr>
<td><label>Tel&eacute;fono</label></td>
<td><input name="Tel&eacute" type="text" size="30"></td>
</tr>
<tr>
<td><label>Direcci&oacute;n</label></td>
<td><label>
<textarea name="Direcci&oacute;n" cols="35" rows="4"></textarea>
</label></td>
</tr>
<tr>
<td><label>Mensaje</label></td>
<td><textarea name="Mensaje" cols="40" rows="6"></textarea></td>
</tr>
<tr>
<td><div align="center">presione para </div></td>
<td><p>
<label>
<input type="submit" name="Submit" value="Enviar">
</label>
<label>o puede
<input type="reset" name="Submit2" value="Restablecer">
el formulario</label>
</p></td>
</tr>
</table>




y este es codigo en PHP para enviarlo


<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<p>&lt; ?php <br />
$Nombre = $_POST['Nombre'];<br />
$E-Mail = $_POST['E-Mail'];<br />
$Empresa = $_POST['Empresa'];<br />
$Tel&amp;eacute;fono = $_POST['Tel&amp;eacute;fono'];<br />
$Direcci&amp;oacute;n = $_POST['Direcci&amp;oacute;n'];<br />
$Mensaje = $_POST['Mensaje'];</p>
<p>$header = 'From: ' . $E-Mail . &quot; \r\n&quot;;<br />
$header .= &quot;X-Mailer: PHP/&quot; . phpversion() . &quot; \r\n&quot;;<br />
$header .= &quot;Mime-Version: 1.0 \r\n&quot;;<br />
$header .= &quot;Content-Type: text/plain&quot;;</p>
<p>$mensaje = &quot;Este mensaje fue enviado por &quot; . $Nombre . &quot;, de la </p>
<p>empresa &quot; . $Empresa . &quot; \r\n&quot;;<br />
$mensaje .= &quot;Su e-mail es: &quot; . $E-Mail . &quot; \r\n&quot;;<br />
$mensaje .= &quot;esta ubicado en: &quot; . $Direcci&amp;oacute;n . &quot; \r\n&quot;;<br />
$mensaje .= &quot;y su telefono es: &quot; . $Tel&amp;eacute;fono . &quot; \r\n&quot;;<br />
$mensaje .= &quot;Mensaje: &quot; . $_POST['Mensaje'] . &quot; \r\n&quot;;<br />
$mensaje .= &quot;Enviado el &quot; . date('d/m/Y', time());</p>
<p>$para = 'micorreo@privado';<br />
$asunto = 'prueba del formulario de filtros rubens';<br />
mail($para, $asunto, utf8_decode($mensaje), $header);<br />
echo 'Mensaje enviado correctamente';<br />
?&gt; </p>
</body>
</html>


de antemano muchas gracias