En verdad no tira ningún error, solo que hace esto:
</tr>
<tr>
<td>Adobe Flash CS5</td>
<td>Freddy Camargo</td>
<td>Fox Andina</td>
<td>123456</td>
<td><img width="16" height="16"
src="img/Prestado"></tb>
<td><input name="idLibro[]" type="checkbox" value="12" /></td>
</tr>
<tr>
<td>PHP 6</td>
<td>Weiro Meier</td>
<td>Fox Andina</td>
<td>312432</td>
<td><img width="16" height="16"
src="img/Prestado"></tb>
<td><input name="idLibro[]" type="checkbox" value="13" /></td>
</tr>
Esta mostrado el mismo resultado para ambos registros, osea.. en base a la consulta que le paso... actualmente hay dos registros, el primer libro: Adobe Flash CS5 cuyo estado es "Disponible" y el segundo libro: PHP 6 que esta "Prestado"..
me falta seguramente lo sig.. que recorra la tabla, IF ( estado = 'Disponible' ) {
$dis = '<img width="16" height="16" src="img/green.png">' ; } else { $dis = '<img width="16" height="16" src="img/red.png">' ; }
el tema es ese
No se como armarlo dentro del While si deberia ser:
Código PHP:
Ver original
IF ( $row["estado"] == 'Disponible' ){
$dis = '<img width="16" height="16" src="img/green.png">' ;
} else {
$dis = '<img width="16" height="16" src="img/red.png">' ;
}
}