AQUI ESTA EL RADIO buscarcurso.php
Código PHP:
Ver original
<?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"> <form action="validaremos.php" method="post"> <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> <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><input name="very[]" id="very[]" type="radio" value="<td>'.$registro2['naf'].'</td>" /></td> </tr>'; } }else{ echo '<tr> <td colspan="6">No se encontraron resultados</td> </tr>'; } echo '</table>'; ?> <input type="submit" name="enviar" id="enviar" value="Enviar" /> </form> <?php ?>
aqui vali la informacion que envio por el check box validaremos.php
Código PHP:
Ver original
<?php require_once('../../Connections/cursos.php'); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> <?php // consulto la el ultimo numero de orden emitida, en este caso el encabezado, y lo ordeno de forma desendente $query_ulencado = "SELECT nafr FROM rparticipantes ORDER BY IDORDEN DESC"; //verificamos que se marcara al menos 1 checkbox echo '<pre>'; echo '<p>Se guardaron los siguientes registros:</p>'; echo '<p>__________________________________________________</p>'; foreach($_POST['very'] as $id) { $sql1="SELECT * FROM rformacion where naf = '$id'"; mysql_query("INSERT INTO rparticipantes (naf,fechai, fechaf, region, gerencia, depatamento,division,ceco) VALUES ('".$row_ulencado['nafr']."','".$fill['fechain']."','".$fill['fechafi']."','".$fill['region']."','".$fill['gerencia']."','".$fill['depatamento']."','".$fill['division']."','".$fill['ceco']."' )") or die(mysql_error()); echo '<p>curso: '.$id.'</p>'; echo '<p>Fecha Inicio: '.$fill['fechain'].'</p>'; echo '<p>Fecha final: '.$fill['fechafi'].'</p>'; echo '<p>region: '.$fill['region'].'</p>'; echo '<p>Gerencia: '.$fill['gerencia'].'</p>'; echo '<p>Departamento: '.$fill['depatamento'].'</p>'; echo '<p>Division: '.$fill['division'].'</p>'; echo '<p>Ceco: '.$fill['ceco'].'</p>'; echo '<p>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</p>'; } }?>