Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/02/2011, 09:43
javier86
 
Fecha de Ingreso: noviembre-2008
Ubicación: Chile
Mensajes: 36
Antigüedad: 15 años, 5 meses
Puntos: 3
Respuesta: Como dibujar tabla tipo asistencia con php

Cita:
Iniciado por bUllan9ebrio Ver Mensaje
Juaz!!! estas realizando lo mismo que yo ....... realize la tabla con las siguientes cabeceras :

Código HTML:
Ver original
  1. <table width="100%" border="1">
  2.   <tr>
  3.   <!--ESTA PARTE SE RELLENA MEDIANTE UNA CONSULTA PARA VERIFICAR LA CANTIDAD DE DIAS DEL MES-->
  4.     <td>NOMBRE</td>
  5.     <td>01-02-2011</td>
  6.     <td>02-02-2011</td>
  7.     <td>03-02-2011</td>
  8.     <td>ETC......</td>
  9.   </tr>
  10.   <tr>
  11.   <!--TAMBIEN LO LLENAS POR MEDIO DE UNA CONSULTA PARA SABER LA CANTIDAD DE NOMBRES A DESPLEGAR Y LOS RADIO BUTTONS SE REALIZAN ATRAVEZ DE UN COUNT A LAS FECHAS :p-->
  12.     <td>JUANITO</td>
  13.    <!--ACA EL WHILE-->
  14.     <td align="center"><input type="radio" name="<?php echo $fecha;?>"></td>
  15.     </tr>


algo asi mas menos es la idea a realizar, espero te sirva.
Gracias por tu interes , pero los encabezados no los puedo generar... estoy intentando esto:

Código PHP:
Ver original
  1. <table border="1">
  2.     <? do {?>
  3.   <tr>
  4.     <th scope="col">nombre</th>
  5.     <th scope="col">fecha</th>
  6.     <th scope="col">fecha</th>
  7.     <th scope="col">fecha</th>
  8.     <? echo "<th>" .$clases["fecha_clase"]. "</th>";?>
  9.   </tr>
  10.  
  11.   <tr>
  12.     <td>pedro</td>
  13.     <td>1</td>
  14.     <td>1</td>
  15.     <td>0</td>
  16.     <? echo "<td>". 1 . "</td>"?>
  17.   </tr>
  18.     <? } while ($clases = mysql_fetch_assoc($clases_mes)); ?>
  19. </table>

Según pensé me deberia dibujar los <TH></TH> y luego ir agregando los <TD></TD>, pero me va agregando filas con las fechas hacia abajo como esto:


nombre fecha fecha fecha
pedro 1 1 0 1
nombre fecha fecha fecha 2010-10-20
pedro 1 1 0 1
nombre fecha fecha fecha 2010-10-27
pedro 1 1 0 1

Gracias.