Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/05/2012, 02:10
Avatar de 60NZ4
60NZ4
 
Fecha de Ingreso: mayo-2012
Ubicación: 404 Not found
Mensajes: 112
Antigüedad: 12 años
Puntos: 2
Respuesta: Checkbox a BD

Hola y gracias por tu rapida respuesta ^^, he probado ese codigo y no funciona tampoco :S ,

solo utilizo PHP, pero aqui te lo adjunto


<table class="contenidos" border="0" cellpadding="0" cellspacing="0">

<tr>
<th>Nombre</th>
<th>Telefono1</th>
<th>Telefono2</th>
<th>Email</th>
<th>Fecha</th>
<th>Validar</th>


</tr>
<?php

$fila = '';
$consulta = "SELECT * FROM TABLA;
$resul=sqlsrv_query($conn,$consulta);

while( $fila = sqlsrv_fetch_array( $resul, SQLSRV_FETCH_NUMERIC) ) {


echo'<tr class="FilaCliente">';

echo '<td>'.$fila[1].'</td>';
echo '<td>'.$fila[2].'</td>';
echo '<td>'.$fila[3].'</td>';
echo '<td>'.$fila[4].'</td>';
echo '<td>'.$fila[5]->format('d-m-Y').'</td>';
echo '<td><center><input type="checkbox" name='.$fila[0].'></center></td>';

echo '</tr>';

}

sqlsrv_free_stmt( $resul);
?>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<form action="Validar.php" method="post">
<input type="submit" name="nuevo" value="Validar" class="BotonEstiloCD" title="Añadir nuevo elemento">
</form>
</td>
</tr>
</table>

creo que el error lo tengo al recuperar el dato del checkbox de este archivo dado que si hago echo $fila[0]; sale vacio jejeje

saludos
__________________
Nadie nace aprendido, un experto es simplemente alguien que ya ha cometido muchos errores