Foros del Web » Programando para Internet » PHP »

formulario con php

Estas en el tema de formulario con php en el foro de PHP en Foros del Web. Hola a todos estoy tratando de enviar un formulario pero solo llega a mi mail los datos vacios es decir los la info de los ...
  #1 (permalink)  
Antiguo 16/05/2007, 20:08
 
Fecha de Ingreso: agosto-2006
Mensajes: 113
Antigüedad: 17 años, 8 meses
Puntos: 1
formulario con php

Hola a todos estoy tratando de enviar un formulario pero solo llega a mi mail los datos vacios es decir los la info de los textfield no llega .

mi archivo php es :
<?php

$nombre = $_POST['nombre'];
$mail = $_POST['mail'];
$empresa = $_POST['empresa'];

$header = 'From: ' . $mail . " \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 . ", de la empresa " . $empresa . " \r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";;
$mensaje .= "Enviado el " . date('d/m/Y', time());

$para = '[email protected]';
$asunto = 'Contacto desde Taller Webmaster';

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

echo '&estatus=ok&';

?>

y el html es :


<!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=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="nombre" name="nombre" method="post" action="envio.php">
<label>Nombre
<input name="nombre" type="text" id="nombre" size="30" />
</label>
</form>
<form id="empresa" name="empresa" method="post" action="envio.php">
<label>empresa
<input name="empresa" type="text" id="empresa" size="30" />
</label>
</form>
<form id="mail" name="mail" method="post" action="envio.php">
<label>mail
<input name="mail" type="text" id="mail" size="30" />
</label>
</form>
<form id="form4" name="form4" method="post" action="envio.php">
<label>enviar
<input type="submit" name="enviar" id="enviar" value="Submit" />
</label>
</form>
<p>&nbsp;</p>
</body>
</html>


Por cualquier info muchas gracias. separe arriba las partes que salen url por que no me deja postarlas.
  #2 (permalink)  
Antiguo 16/05/2007, 20:56
Avatar de lado2mx
Colaborador
 
Fecha de Ingreso: agosto-2001
Ubicación: Veracruz
Mensajes: 3.720
Antigüedad: 22 años, 8 meses
Puntos: 9
Re: formulario con php

Creo que lo hiciste en Dreamweaver así que checa esto:
Código HTML:
<!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=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form method="post" action="envio.php">
  <label>Nombre
  <input name="nombre" type="text" id="nombre" size="30" />
  </label>
<label>empresa
  <input name="empresa" type="text" id="empresa" size="30" />
  </label>
<label>mail
  <input name="mail" type="text" id="mail" size="30" />
  </label>
<label>enviar
  <input type="submit" name="enviar" id="enviar" value="Submit" />
  </label>
<p>&nbsp;</p></form>
</body>
</html> 
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:31.