Ver Mensaje Individual
  #24 (permalink)  
Antiguo 17/05/2015, 17:53
lumt90
 
Fecha de Ingreso: abril-2015
Mensajes: 11
Antigüedad: 9 años
Puntos: 0
Respuesta: Pasar Variables de un Formulario a Otro

buenas buenas esta leyendo es post muy bueno ya lo hice con seis formularios pero ahora quiero mandarlo a la base de datos por medio de un transac. lo he intentado de mucahs formas y no lo he podido lograr les agradecira si me ayudan gracias

aca les dejo lo q tengo hecho

registropersona.php
Código PHP:
<doctype!>
<
html lang="es">
    <
meta charset="utf-8">
    <
link rel="stylesheet" href="estiloformulario.css">
   <
script type="text/javascript">
function 
validar(e) { // 1
    
tecla = (document.all) ? e.keyCode e.which// 2
    
if (tecla==8) return true// 3
    
patron =/[A-Zañ-zs]/; // 4
    
te String.fromCharCode(tecla); // 5
    
return patron.test(te); // 6
}
</script>
<head>
    
<title>Registro Personal</title>
    
   
    
</head>
<body>

<header>
    <p id="cabeza">TecnoPoint</p>
    
    </header>
    
    <aside>
       
        <p id="info">Formulario de Registro</p>
            
            
         <form name="registro-persona" action="Postulante.php" method="POST">   
        
       <br><br><label id="nombre">Nombre:</label>
        <br><input title="Se necesita un nombre" type="text" name="nombre-persona"placeholder="Nombre" onkeypress="return validar(event)" required="">
            
        
        <br><br><label id="apellido">Apellidos:</label>
        <br><input title="se necesita un apellido" type="text" name="apellido-persona" placeholder="Apellidos" onkeypress="return validar(event)" required="">
        
        <br><br><label id="cedula">Cedula:</label>
        <br><input title="se necesita un numero de cedula" type="text" name ="ncedula" placeholder="Cedula" required="">
        
       
        <br><br><label id="genero">Genero:</label>
         <br><INPUT type="radio" name="genero" value="Masculino" onkeypress="return validar(event)" required="">
    Masculino&nbsp;
    <INPUT type="radio" name="genero" value="Femenino" onkeypress="return validar(event)" required="">
    femenino&nbsp;
        
        <br><br><label id="fechanacimiento">Fecha de Nacimiento:</label>
        <br><input title="digite su fecha de nacimiento" type="date" name="fechanac" required="">
        
      
        <br><br><label id="estadocivil">Estado Civil:</label>
        <br><INPUT type="radio" name="estadocivil" value="Soltero" required="">
    soltero&nbsp;
    <INPUT type="radio" name="estadocivil" value="Casado" required="">
    Casado&nbsp;

             
              <br><br><label id="telefono">Telefono:</label>
        <br><input title="ingrese su numero de telefono" type="tel" name="telefono"  pattern="[0-9]{8}" placeholder="2222-0000" required="">
        
        
        <br><br><label id="direccion">Direccion Domiciliar:</label>
        <br><input title="ingrese su direccion domiciliar" type="text" name="direccion" placeholder="Direccion Domiciliar" required="">
        
        <br><br><label id="correo">Correo Electronico:</label>
        <br><input title="se necesita un correo" type="email" name ="email"placeholder="Correo Electronico" required="">
        
       <br><br> <input type="submit"  name="enviar" value="siguiente" >

       <input type="submit" value="inicio" onclick = "location='../aniweblogeado/Aniweblogeado.html'"/>



   <!--<br><br> <p> <a href="Postulante.html"> Siguiente</a> </p>-->
      </form>
   </aside>
  
<footer>
 <small><cite>Tecnopoint Sistema de informacion de recursos humanos SIRHU  </cite></small>
    </footer>

</body>
</html> 



Postulante.php
Código PHP:
<?php 
session_start
();
$_SESSION['nombrePersona'] = $_POST['nombre-persona'];
$_SESSION['apellidoPersona'] = $_POST['apellido-persona'];
$_SESSION['cedulaPersona'] = $_POST['ncedula'];
$_SESSION['generoPersona'] = $_POST['genero'];
$_SESSION['fechaNacPersona'] = $_POST['fechanac'];
$_SESSION['estadoCivilPersona'] = $_POST['estadocivil'];
$_SESSION['telefonoPersona'] = $_POST['telefono'];
$_SESSION['direccionPersona'] = $_POST['direccion'];
$_SESSION['emailPersona'] = $_POST['email']; 
?>


<doctype!>
<html lang="es">
    <meta charset="utf-8">
    <link rel="stylesheet" href="estiloformulario.css">
   <script type="text/javascript">
function validar(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
    if (tecla==8) return true; // 3
    patron =/[A-Zañ-z\s]/; // 4
    te = String.fromCharCode(tecla); // 5
    return patron.test(te); // 6
}
       function numero(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
    if (tecla==8) return true; // 3
    patron =/\w/; // 4
    te = String.fromCharCode(tecla); // 5
    return patron.test(te); // 6
}
       
</script>
<head>
    
<title>Registro Postulante</title>
    
   
    
</head>
<body>

<header>
    <p id="cabeza">TecnoPoint</p>
    
    </header>
    
    <aside>
       
        <p id="info">Formulario de Reclutamiento</p>
            
            
         <form action="Referencia Personal.php" method="POST">   
        
       <br><br><label id="carruni">Carrera Universitaria:</label>
       <br><select title="Seleccione una carrera" name="carrera" required="" onChange="combo(this, 'lista')">
             <option>
   <option> Administracion de empresa
   <option> Ing Computacion
       <option> Derecho
           <option> Economia
               <option> Ing Sistemas
                   <option> Ing Industrial
                       <option> Mercadeo Venta
                           <option> Tecnico Reparacion
                               <option> Ing Telecomunicaciones
       
</select>
            
        
        <br><br><label id="grdest">Grado de Estudio:</label>
        <br><select title="Seleccione una grado" name="grado" required="" onChange="combo(this, 'lista')">
             <option>
   <option> Primer Ano
   <option> Segundo Ano
       <option> Tercer Ano
           <option> Cuarto Ano
               <option> Quinto Ano
                  <option> estudios terminados
</select>
        
        <br><br><label id="ultest">Ultimo Estudio:</label>
        <br><select name="ultimo-estudio" required="" onChange="combo(this, 'lista')">
             <option>
             <option>Doctorado
   <option> Maestria
   <option> Posgrado
       <option> Universitario
           <option> Tecnico Medio
               <option> Bachiller
                   <option> Ciclo Basico
                       <option> Primaria
                           <option> Sin Estudios
                                     
</select>
        
        <br><br><label id="espec">Especialidad:</label>
        <br><input title="ingrese su especialidad" name ="especialidada" type="text" placeholder="ejemplo: programador" onkeypress="return validar(event)" required="">
        


        
        <br><br><label id="ainter">Area de Interes:</label>
        <br><select name="area-interes" required="" onChange="combo(this, 'lista')">
             <option>
   <option> Gerente General
   <option> Gerente Venta
       <option> Soporte Tecnico
           <option> Recursos Humanos
               <option> Contador
                   <option> Gerente Financiero
                       <option> Limpieza
                           <option> Secretaria
                               <option> Logistica
                                   <option>Programador
                                       <option>Informatica
</select>
        
        <br><br><label id="ointer">Otras Areas de Interes:</label>
        <br><select name="otra-area" required=""  onChange="combo(this, 'lista')">
             <option>
   <option> Gerente General
   <option> Gerente Venta
       <option> Soporte Tecnico
           <option> Recursos Humanos
               <option> Contador
                   <option> Gerente Financiero
                       <option> Limpieza
                           <option> Secretaria
                               <option> Logistica
                                   <option>Programador
                                       <option>Informatica
</select>
             
         
     <br><br><label id="frec">Fecha de Reclutamiento:</label>
       <br><input title="digite su fecha de nacimiento" name="fecha" type="date" required="">
        
       <br><br><input type="submit" value="siguiente"> 

        

       <input type="submit" value="inicio" onclick = "location='../aniweblogeado/Aniweblogeado.html'"/>
     
      <!-- <br><br> <p> <a href="Referencia Personal.html"> Siguiente</a> </p>   -->

    
    
      </form>
   </aside>
  
<footer>
 <small><cite>Tecnopoint Sistema de informacion de recursos humanos SIRHU  </cite></small>
    </footer>

</body>
</html>