Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/05/2015, 18:07
lumt90
 
Fecha de Ingreso: abril-2015
Mensajes: 11
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: como envio 6 formularios por session a mysql por medio de un transac

Referencia Personal.php
Código HTML:
Ver original
  1. <?PHP
  2. session_start();
  3.  
  4.  $_SESSION['carreraPostulante'] = $_POST['carrera'];
  5.  $_SESSION['gradoEstudioPostulante'] = $_POST['grado'];
  6.  $_SESSION['ultimoEstudioPostulante'] = $_POST['ultimo-estudio'];
  7.  $_SESSION['especialidadPostulante'] = $_POST['especialidada'];
  8.  $_SESSION['areainteresPostulante'] = $_POST['area-interes'];
  9.  $_SESSION['otrasAreasPostulante'] = $_POST['otra-area'];
  10.  $_SESSION['fechaReclutamientoPostulante'] = $_POST['fecha'];
  11. ?>
  12.  
  13.  
  14. <doctype!>
  15. <html lang="es">
  16.     <meta charset="utf-8">
  17.     <link rel="stylesheet" href="estiloformulario.css">
  18.    <script type="text/javascript">
  19. function validar(e) { // 1
  20.     tecla = (document.all) ? e.keyCode : e.which; // 2
  21.     if (tecla==8) return true; // 3
  22.     patron =/[A-Zañ-z\s]/; // 4
  23.     te = String.fromCharCode(tecla); // 5
  24.     return patron.test(te); // 6
  25. }
  26.        function numero(e) { // 1
  27.     tecla = (document.all) ? e.keyCode : e.which; // 2
  28.     if (tecla==8) return true; // 3
  29.     patron =/\w/; // 4
  30.     te = String.fromCharCode(tecla); // 5
  31.     return patron.test(te); // 6
  32. }
  33.        
  34.    
  35. <title>Registro Postulante</title>
  36.    
  37.    
  38.    
  39. </head>
  40.  
  41.     <p id="cabeza">TecnoPoint</p>
  42.    
  43.     </header>
  44.    
  45.     <aside>
  46.        
  47.         <p id="info">Formulario de Reclutamiento<br><br>(Referencia Personal)</p>
  48.            
  49.            
  50.          <form action="Referencia Empresa.php" method="POST">  
  51.        
  52.       <br><br><label id="nombre">Nombre:</label>
  53.         <br><input title="ingrese su nombre" type="text" name="nombre-referencia" placeholder="Nombre" onkeypress="return validar(event)" required="">
  54.            
  55.        
  56.   <br><br><label id="apellido">Apellido:</label>
  57.         <br><input title="ingrese su apellido" type="text" name="apellido-referencia" placeholder="Apellido" onkeypress="return validar(event)" required="">
  58.            
  59.    <br><br><label id="telefono">Telefono:</label>
  60.         <br><input title="ingrese su numero de telefono" type="tel" name="telefono-referencia" placeholder="+(505)2222-0000" required="">
  61.              <br><br><label id="correo">Correo Electronico:</label>
  62.         <br><input title="se necesita un correo" type="email" name="email-referncia" placeholder="Correo Electronico" required="">
  63.              
  64.              <br><br><label id="cargo">Cargo Desempenado:</label>
  65.         <br><input title="ingrese un cargo" type="text" name="cargo-referencia" placeholder="Cargo que Desempena" onkeypress="return validar(event)" required="">
  66.              
  67.              <br><br><label id="empresa">Nombre de Empresa:</label>
  68.         <br><input title="ingrese una empresa" type="text" name="empresa-referencia" placeholder="Nombre de Empresa" onkeypress="return validar(event)" required="">
  69.        
  70.        <br><br><input type="submit" value="siguiente">
  71.  
  72.          
  73.  
  74.        <input type="submit" value="inicio" onclick = "location='../aniweblogeado/Aniweblogeado.html'"/>
  75.  
  76.         <!-- <br><br> <p> <a href="Referencia Empresa.html"> Siguiente</a> </p> -->
  77.    
  78.       </form>
  79.    </aside>
  80.  
  81.  <small><cite>Tecnopoint Sistema de informacion de recursos humanos SIRHU  </cite></small>
  82.     </footer>
  83.  
  84. </body>
  85. </html>


Referencia Empresa.php
Código HTML:
Ver original
  1. <?php
  2. session_start();
  3.  
  4.    $_SESSION['nombreReferenciaPers'] = $_POST['nombre-referencia'];
  5.    $_SESSION['apellidoReferenciaPers'] = $_POST['apellido-referencia'];
  6.    $_SESSION['telefonoReferenciaPers'] = $_POST['telefono-referencia'];
  7.    $_SESSION['emailReferenciaPers'] = $_POST['email-referncia'];
  8.    $_SESSION['cargoReferenciaPers'] = $_POST['cargo-referencia'];
  9.    $_SESSION['nombreEmpresaReferenciaPers'] = $_POST['empresa-referencia'];
  10. ?>
  11.  
  12.  
  13. <doctype!>
  14. <html lang="es">
  15.     <meta charset="utf-8">
  16.     <link rel="stylesheet" href="estiloformulario.css">
  17.    <script type="text/javascript">
  18. function validar(e) { // 1
  19.     tecla = (document.all) ? e.keyCode : e.which; // 2
  20.     if (tecla==8) return true; // 3
  21.     patron =/[A-Zañ-z\s]/; // 4
  22.     te = String.fromCharCode(tecla); // 5
  23.     return patron.test(te); // 6
  24. }
  25.        function numero(e) { // 1
  26.     tecla = (document.all) ? e.keyCode : e.which; // 2
  27.     if (tecla==8) return true; // 3
  28.     patron =/\w/; // 4
  29.     te = String.fromCharCode(tecla); // 5
  30.     return patron.test(te); // 6
  31. }
  32.        
  33.    
  34. <title>Registro Postulante</title>
  35.    
  36.    
  37.    
  38. </head>
  39.  
  40.     <p id="cabeza">TecnoPoint</p>
  41.    
  42.     </header>
  43.    
  44.     <aside>
  45.        
  46.         <p id="info">Formulario de Reclutamiento<br><br>(Referencia Empresa)</p>
  47.            
  48.            
  49.          <form action="Experencia Laboral.php" method="POST">  
  50.        
  51.       <br><br><label id="nombre">Nombre Empresa:</label>
  52.         <br><input title="ingrese el nombre" type="text" name="nombre-empresa" placeholder="Nombre Empresa" onkeypress="return validar(event)" required="">
  53.            
  54.            
  55.    <br><br><label id="telefono">Telefono:</label>
  56.         <br><input title="ingrese el numero de telefono" type="tel" name="tel-ref-empresa" placeholder="+(505)2222-0000" required="">
  57.  
  58.              <br><br><label id="correo">Correo Electronico:</label>
  59.         <br><input title="se necesita un correo" type="email" name="email-ref-empresa" placeholder="Correo Electronico" required="">
  60.              
  61.              
  62.              <br><br><label id="empresa">Nombre del Contacto:</label>
  63.         <br><input title="ingrese un contacto" type="text"  name="contacto-empresa" placeholder="Nombre del contacto" onkeypress="return validar(event)" required="">
  64.        
  65.          <br><br><input type="submit" value="Siguiente">  
  66.  
  67.          <input type="submit" value="inicio" onclick = "location='../aniweblogeado/Aniweblogeado.html'"/>
  68.  
  69.        
  70.        <!-- <br><br> <p> <a href="Experencia Laboral.html"> Siguiente</a> </p> -->
  71.    
  72.       </form>
  73.    </aside>
  74.  
  75.  <small><cite>Tecnopoint Sistema de informacion de recursos humanos SIRHU  </cite></small>
  76.     </footer>
  77.  
  78. </body>
  79. </html>