Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/03/2005, 10:10
isaaccastillo
 
Fecha de Ingreso: marzo-2005
Mensajes: 2
Antigüedad: 19 años, 1 mes
Puntos: 0
ayuda envio mail en php

tengo el siguiente problema al enviar un formulario a un mail por php:
cuando paso el valor de las variables a la función mail pasan vacias ejemplo:

CUAL ES EL ERROR

este es mi formulario:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="http://localhost/correo.php" method="GET" enctype="TEXT/PLAIN" name="Correo">
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="2" bgcolor="#E9C49E">
<tr>
<td width="30%" valign="top"><strong>Tu nombre</strong></td>
<td><input name="nombre" type="text" value="" size="40"></td>
</tr>
<tr>
<td width="30%" valign="top"><strong>Tu e-mail</strong></td>
<td><input name="email" type="text" value="" size="40"></td>
</tr>
<tr>
<td width="30%" valign="top"><strong>Tu Mensaje</strong></td>
<td> <textarea name="mensaje" cols="30" rows="5" id="mensaje"></textarea>
</td>
</tr>
<tr>
<td valign="top"><input type="submit" name="Submit" value="Enviar"></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

ESTE ES MI SCRIP PHP

<?php
//aqui es cuando tomo mis variables y pasan vacias a la función mail, porque?
$nombre=$_GET['nombre'];
$email=$_GET['email'];
$mensaje=$_GET['mensaje'];
if (empty($nombre) || empty($email) || empty($mensaje)) {
echo "<h2 align=\"center\">El formulario no está completo</h2>";
}
else {
mail ("[email protected]", "comentarios",
"$mensaje", "From: $nombre <$email>" );
echo "<h2 align=\"center\">El mensaje ha sido enviado. Gracias.</h2>";
}
?>