Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/03/2013, 12:45
Avatar de tuclavador
tuclavador
 
Fecha de Ingreso: abril-2012
Mensajes: 25
Antigüedad: 12 años
Puntos: 0
Respuesta: Formularios de mi web vacios

Lo siento aqui esta el codigo del form. y de la validacion php:

<form id="form1" name="form1" action="validar.php" method="post" onsubmit="return validar()">

<table width="558" border="0" height="204">
<tr>
<td width="131">Ingrese su Nombre: </td>
<td width="417"><input type="string" name="nombre" size="28" maxlength="60">
</td>
</tr>

<tr>
<td>Ingrese su Email:</td>
<td><input type="string" name="email" size="28" maxlength="100" value=""></td>
</tr>

<tr>
<td>Tel&eacute;fono o Celular:</td>
<td><input type="string" name="telefono" size="28" maxlength="100" ></td>
</tr>

<tr>
<td align="left" >Consultas:</td>
<td><textarea cols="25" rows="4" name="comentarios"></textarea></td>
</tr>

<tr align="center">
<td align="left">&nbsp;</td>
<td><input type="submit" name="boton" value="Enviar">&nbsp;&nbsp;&nbsp;
<input type="Reset" name="limpiar"value="Limpiar"></td>

</table>

</form>



validacion:

<?php
$nombre = $_POST['nombre'];
$fecha = $_POST['fecha'];
$email = $_POST['email'];
$telefono = $_POST['telefono'];
$comentarios = $_POST['comentarios'];
$Hora= date('H:i:s');

/* $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 .= "------------------------------------------------------- \n";
$mensaje .= " ******* NUEVO CONTACTO DESDE marcas.com.bo ******* \r\n";
$mensaje .= "------------------------------------------------------- \n";
$mensaje .= "Nombre del remitente: " . $nombre . " \r\n";
/*$mensaje .= "Fecha: " . $fecha . " \r\n";*/
$mensaje .= "Email: " . $email . " \r\n";
$mensaje .= "Telefono: " . $telefono . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());
$mensaje .= " - " . $Hora . " \r\n";
$mensaje .= "------------------------------------------------------- \n";
$mensaje .= "Comentarios: " . $comentarios . " \r\n";
$mensaje .= "------------------------------------------------------- \n";
//$mensaje .= "Comentario: " . $_POST['comentario'] . " \r\n";


$para = '[email protected]';
$asunto = 'Formulario Marcas';

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

echo 'Gracias por escribirnos';
?>
Gracias por responder tan pronto!!