Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/08/2008, 17:39
mega0079
 
Fecha de Ingreso: agosto-2008
Mensajes: 272
Antigüedad: 15 años, 8 meses
Puntos: 1
ayuda con formulario php porfavor :)

bueno estoy haciendo un formulario, el cual se me manda al mail, pero lo que pasa es que no me aparecen los datos, tengo dos archivos uno es

formulario.php y contien lo siguinete
Código:
<!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>Formulario</title>
</head>
<body bgcolor="#303030">
<body text="#E5E5E5">
<font face="tahoma">
<font face = "2">
<body link="#e5e5e5" vlink="#e0e0e0">
<p align="center"><body>
<strong> Formulario de contacto</strong>
<br /><br />
Inserte los datos que acontinuacion se solicitan y en breve nos pondremos en contacto con usted.
<form name="contacto" method="post" action="contacto.php">
<table width="90%" border="2" align="center" bordercolor="#ccccccc">
<tr>
<td width="15%"><p><strong>Nombre:</strong></p></td>
<td colspan="3"><input name="nombre" type="text" value="" size="109">
</td>
</tr>
<tr>
<td><p><strong>Direccion:</strong></p></td>
<td colspan="3"><input name="apellidos" type="text" size="109">
</td>
</tr>
<tr>
<td width="15%"><p>
<strong>Localidad:</strong></p></td>
<td width="25%">
<input name="localidad" type="text" size="36">
</td>
<td width="15%"><p>
<strong>Provincia:</strong>
</p></td>
<td width="25%">
<input name="provincia" type="text" size="36" />
</td>
</tr>
<tr>
<td>
<p>
<strong> Telefono:</strong>
</p>
</td>
<td><input name="telefono" type="text" size="36" />
</td>
<td>
<p>
<strong>E-mail:</strong>
</p></td>
<td>
<input name="email" type="text" size="36" />
</td>
</tr>
</table>
<p align="center">
<input type="submit" name="Submit" value="Enviar datos" />
</p>
</form>



</body>
</html>
El otro es contacto.php y trae lo siguiente
Código:
<!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>contacto</title></head>
<body bgcolor="#303030">
<body text="#e5e5e5">
<font face="tahoma">
<font size="2">
<body link="#e5e5e5" vlink="e0e0e0">
<p align="center">

<strong>Su mensaje ha sido enviado. en breve contactaremos con usted.</strong></p>
<p align="center"><strong>Gracias!</strong></p>
<p align="center">&nbsp;</p>

<?
$fecha=date("d-m-y");
$hora=date("H:i");
$destinatario="[email protected]";

$asunto="Contacto de cliente";
echo"<br><br><br>";
echo"Compruebe si su datos son correctos, de lo contario pulse en <a href=formulario.php>Volver</a>";
echo"$nombre";
$texto=
"Nombre:"."\n".$nombre."<br>".
"Apellidos:"."\n".$apellidos."<br>".
"Direccion:"."\n".$direccion."<br>".
"Localidad:"."\n".$localidad."<br>".
"Provincia:"."\n".$provincia."<br>".
"Telefono:"."\n".$telefono."<br>".
"Email:"."\n".$email."<br>".
"Fecha:"."\n".$fecha."<br>".
"Hora:"."\n".$hora;

echo "<br><br><br>";
echo $texto;
echo "<br><br>";
mail ($destinatario,$asunto,$texto);
?>







</html>
Y bueno en mi mail recibo:
Asunto: contacto del cliente
y eso en el cuerpo
Nombre:
<br>Apellidos:
<br>Direccion:
<br>Localidad:
<br>Provincia:
<br>Telefono:
<br>Email:
<br>Fecha:26-08-08
<br>Hora:16:22

aun llenando los campos en formulario, no se reflejan a la hora de ver el correo

Espero me puedan ayudar muchisimas gracias!!