Código PHP:
Ver original
BUSCAR CURSO <?php include('conexion.php'); $dato = $_POST['dato']; //EJECUTAMOS LA CONSULTA DE BUSQUEDA //CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX echo '<table class="table table-striped table-condensed table-hover"> <tr> <th width="400">Cursos</th> <th width="200">Fecha inicio</th> <th width="400">Fecha Fin</th> <th width="400">Region</th> <th width="400">Gerencia</th> <th width="400">Departamento</th> <th width="400">Division</th> <th width="400">Ceco</th> <th width="50">Selecione</th> </tr>'; echo '<tr> <td>'.$registro2['naf'].'</td> <td>'.fechainicio($registro2['fechai']).' <td>'.fechafin($registro2['fechaf']).'</td> <td>'.$registro2['region'].'</td> <td>'.$registro2['gerencia'].'</td> <td>'.$registro2['depatamento'].'</td> <td>'.$registro2['division'].'</td> <td>'.$registro2['ceco'].'</td> <td><form method="post" action="guardar.php"> <span id="bottonradio"> <label> <input type="radio" name="mostrar" value=" " /> </label> </form> <input type="submit" name="guardar" /> </tr>'; } }else{ echo '<tr> <td colspan="6">No se encontraron resultados</td> </tr>'; } echo '</table>'; ?>
Código PHP:
Ver original
BUSCAR TRABAJADOR <?php include('conexion.php'); $dato = $_POST['dato']; //EJECUTAMOS LA CONSULTA DE BUSQUEDA $registro = mysql_query("SELECT * FROM rtrabajadores WHERE tindicador LIKE '%$dato%' ORDER BY tnombre ASC"); //CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX echo '<table class="table table-striped table-condensed table-hover"> <tr> <th width="300">Indicador</th> <th width="150">Cedula</th> <th width="150">Nombre</th> <th width="200">Apellido</th> <th width="200">Indicador Supervisor</th> <th width="50">Seleccione</th> </tr>'; echo '<tr> <td>'.$registro2['tindicador'].'</td> <td>'.$registro2['cedula'].'</td> <td>'.$registro2['tnombre'].'</td> <td>'.$registro2['tapellido'].'</td> <td>'.$registro2['indicadors'].'</td> </td> <td><a href="guardar.php"('.$registro2['tindicador'].');"<form id="form1" name="form1" method="get" action="guardar.php"> <span id="sprycheckbox1"> <label> <input type="checkbox" name="checkbox1" id="checkbox1" /> </label> </form> </tr>'; } }else{ echo '<tr> <td colspan="6">No se encontraron resultados</td> </tr>'; } echo '</table>'; ?>
MI BUSCADOR
Código PHP:
Ver original
<header><strong>CURSOS</strong></header> <section> <table border="0" align="center"> <tr> <td width="333"><input type="text" placeholder="Busca un Curso " id="bsnaf"/></td> <td width="142"><input type="date" id="bddesde"/></td> <td width="50">Hasta </td> <td width="142"><input type="date" id="bdhasta"/></td> </tr> </table> </section> <div class="registros" id="resultados"></div> <center></center> <div class="modal-footer"></div> </form> </div> </div> </div> <header>TRABAJADORES</header> <section> <table border="0" align="center"> <tr> <td width="335"><input type="text" placeholder="Busca un trabajador " id="tindicador"/> <td> </td> <td> </td> <td> </td> <td width="200"> </td> </tr> </table> </section> <center> <ul class="pagination" id="pagination"> <div class="registros" id="trabajadores"></div> </ul> <td width="300"><p> </p> <p> </p> <p> </p> <p align="center"> </p> <p align="right"><a target="_blank" href="guardar.php" class="btn btn-danger">Registrar al participante </a> </p> <p align="right"> <a target="_blank" href="index.php" class="btn btn-danger"> Limpiar</a></p> </center>
lo que yo requiero hacer es registrar ah los trabajadores en los cursos pero al registrarlos requiero datos del trabajador y del curso
base de datos
trabajador curso
nombre apellido cédula indicador nombre del curso, fecha inicio, fecha fin etc
por eso coloque el radio ah los cursos y el check box ah los trabajadores pero no se como enviar esos datos ah la base de datos.
podrian ayudarme o mas o menos que puedo hacer.
de ante mano gracias.