elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  formulario llega en blanco
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: formulario llega en blanco  (Leído 1,335 veces)
mhroth

Desconectado Desconectado

Mensajes: 9


Ver Perfil
formulario llega en blanco
« en: 16 Septiembre 2013, 17:12 pm »

tengo un formulario html y php que me llega en blanco y no me aclaro porque

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<meta http-equiv="Content-Language" content="es" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Solicitud de Admision</title>
<style type="text/css">
.top {
            border: 5px solid #800000;
            background-color: #FFFF99;
            font-family: Arial;
            font-size: xx-large;
            font-weight: bold;
            text-align: center;
            color: blue;  
}
.div       {
            margin: .4em 0;
            margin-left: 30px;
            font-family: Arial;
            font-size: medium;
}
.div label {
            width: 10%;
            float: left;
         
}
.style1 {
            font-size: small;
            color: blue;
            margin-left: 30px;
}
.enviar {
            border:thick;
            padding-left: 150px;
            padding-top: 5px;
}
.style3 {
            padding-left: 30px;
            font-family: Arial;
            font-size: x-large;
            color: black;
            }
.style4 {
            color: navy;
            font-size: xx-large;
            margin-left: 30px;
}

.style5 {
            text-decoration: underline;
            margin-left: 40px;
}

</style>
      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
      <link rel="stylesheet" type="text/css" href="css/reset.css"/>
      <script type="text/javascript" src="js/modernizr.js"></script>
</head>

<body style=" background-color: #FFCC99">
   <form action="enviar.php" method="post"/>
      
   
      <span class="style4"><strong> <img src="images/varios/logo%20club.png" alt="logo" width="75" height="100" /> CANCELADAGOLF<br />
      <br />
      </strong></span><p class="style3">
      <strong><span class="style5">SOLICITUD DE ADMISION</span></strong></p>
      <p class="style3">
      &nbsp;</p>

         <div class="div">
          <label for="nombre">Nombre:</label>
          <input type="text" id="nombre" />
           </div>
        
           <div class="div">
          <label for="apellidos">Apellidos:</label>
          <input type="text" id="apellidos" size="35" />
           </div>
        
           <div class="div">
          <label for="direccion">Dirección:</label>
          <input type="text" id="direccion" size="35" />
           </div>
        
           <div class="div">
          <label for="cod.postal">Cod.postal:</label>
          <input type="text" id="cod.postal" size="10" />
           </div>
        
           <div class="div">
          <label for="poblacion">Población:</label>
          <input type="text" id="poblacion" size="35" />
           </div>
        
           <div class="div">
          <label for="nif/nie">Nif/Nie:</label>
          <input type="text" id="nif/nie" size="15" />
           </div>
        
           <div class="div">
          <label for="nacido_el">Nacido el:</label>
          <input type="text" id="nacido_el" size="15" />
           </div>
        
           <div class="div">
          <label for="tel.movil">Tel. móvil:</label>
          <input type="text" id="tel. movil" size="15" />
           </div>
        
           <div class="div">
          <label for="email">Email:</label>
          <input type="text" id="email" size="35" />
           </div>
        
           <div class="div">
          <label for="no_licencia">Nº Licencia:</label>
          <input type="text" id="no_licencia" size="15" />
          </div>
          
          <div class="div">   
            <label for="handicap">Handicap</label>
          <input type="text" id="handicap" size="5" />
          </div>
          
          <div class="div">
         <label for="cta.bancaria">Cta. bancaria:</label>
          <input type="text" id="cta.bancaria" size="25" />
          </div>
          
          <div class="div">
          <label for="fecha">Fecha:</label>
          <input type="text" id="fecha" size="15" />
          </div>
          
       <br />
       <br />
      <span class="style1"><em>EL SOLICITANTE, AL ENVIAR LA SOLICITUD, SE
      DECLARA<br />
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CONFORME CON LAS REGLAS Y LOS ESTATUTOS DEL CLUB</em></span>
      <p class="enviar">
       <input type="submit" id="submit" value="enviar"/>
       </p>

</body>

</html>

el php:
<?php;
      
$nombre = $_POST["nombre"];
$apellidos = $_POST["apellidos"];
$direccion = $_POST["direccion"];
$cod_postal = $_POST["cod_postal"];
$poblacion = $_POST["poblacion"];
$nif_nie = $_POST["nif_nie"];
$nacido_el = $_POST["nacido_el"];
$tel_movil = $_POST["tel_movil"];
$no_licencia = $_POST["no_licencia"];
$handicap = $_POST["handicap"];
$cta_bancaria = $_POST["cta_bancaria"];
$fecha = $_POST["fecha"];
      
$header = "From:" .$email."\r\n";
$header .= "X-Mailer: PHP/" .phpversion(). "\r\n";
$header .= "Mime-Version: 1.0 \r\n";
      
$mensaje = "Este mensaje fue enviado por:" .$email. "\r\n";      
$mensaje .= "Nombre: ".$nombre."\r\n";      
$mensaje .= "Apellidos: ".$apellidos."\r\n";
$mensaje .= "Dirección: ".$direccion."\r\n";
$mensaje .= "Cod.postal: ".$cod_postal."\r\n";
$mensaje .= "Población: ".$poblacion."\r\n";
$mensaje .= "Nif/Nie : ".$nif_nie."\r\n";
$mensaje .= "Nacido el: ".$nacido_el."\r\n";
$mensaje .= "Tel.móvil: ".$tel_movil."\r\n";
$mensaje .= "Licencia: ".$no_licencia."\r\n";
$mensaje .= "Handicap: ".$handicap."\r\n";
$mensaje .= "Cta.bancaria: ".$cta_bancaria."\r\n";
$mensaje .= "Fecha: ".$fecha."\r\n";
      
$para = "info@canceladagolf.com";
$asunto = "Solicitud";
mail($para, $asunto, utf8_decode($mensaje), $header);

         
echo "mensaje enviado correctamente. Bienvenido a CANCELADAGOLF";

?>

¿hay alguien que me puede echar una mano?

gracias


« Última modificación: 19 Septiembre 2013, 17:49 pm por mhroth » En línea

basickdagger


Desconectado Desconectado

Mensajes: 650


System.out.println("this is weird as fuck");


Ver Perfil
Re: formulario llega en blanco
« Respuesta #1 en: 18 Septiembre 2013, 20:49 pm »

post de php recibe el name de tu formulario no el ID...  solo agregale a tus campos el mismo nombre d etu id pero con name y listo ej...

Código:
//tu lo tienes asi...
<input type="text" id="nombre" />


//haslo asi...
<input type="text" id="nombre" name="nombre"/>

saludos!!


En línea

mhroth

Desconectado Desconectado

Mensajes: 9


Ver Perfil
Re: formulario llega en blanco
« Respuesta #2 en: 19 Septiembre 2013, 17:48 pm »

muchas gracias por tu atención. Lo he cambiado como tu has sugerido y funciona perfectamente.
gracias otra vez, campeon
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
El correo que llega del formulario esta vacio! « 1 2 »
PHP
elpirata15hd 11 13,927 Último mensaje 28 Abril 2011, 07:48 am
por elpirata15hd
No llega los datos de mi formulario PHP, el correo si llega pero sin la info
PHP
joycestory 8 5,253 Último mensaje 28 Agosto 2012, 22:46 pm
por michaelalfaro
Me llega el formulario, sin los datos del formulario
PHP
michaelalfaro 1 1,858 Último mensaje 27 Agosto 2012, 18:41 pm
por RevangelyonX
Problemas con correos en blanco de formulario contacto.php
PHP
SouLr0x 0 1,407 Último mensaje 27 Mayo 2013, 17:51 pm
por SouLr0x
El correo me llega en blanco desde la pagina de contactenos
Desarrollo Web
gymarrero 1 2,443 Último mensaje 13 Septiembre 2021, 10:24 am
por #!drvy
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines