Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2005, 21:15
Suyta
(Desactivado)
 
Fecha de Ingreso: septiembre-2004
Mensajes: 360
Antigüedad: 19 años, 7 meses
Puntos: 1
Mostrar y actualizar registros

Hola.
Necesito mostrar los registros de mi tabla y eventualmente actualizarlos pero tengo un campo enum que quiero mostrar con un checkbox y no hay manera.
Tengo esto:
Código PHP:
<?

$sqlalt
=("SELECT Country AS COUNTRY, group1 AS G1, group2 AS G2 FROM groups ");
$resultalt mysql_query($sqlalt$con) or die("Error al leer base de datos: ".mysql_error);
if (
$rowmysql_fetch_array($resultalt))
{

   echo 
"<TABLE BORDER='1'>";
   echo 
"<TR><TD align='center'><strong><font color=white><small>Country</small></small></TD><TD  align='center'><small><strong><font color=white>G1</small></small></TD><TD align='center'><small><font color=white><strong>G2</small></small></TD></TR>";
   DO
   {
     echo 
"<TR><TD align='left'><small>".$row["COUNTRY"]."</small></small></TD><TD align='center'><small><form action='up_countries_groups.php' method='post'> <input type='text' size='1' name='group1' value=".$row['G1']."></small></small></TD><TD align='center'><small><form action='up_countries_groups.php' method='post'> <input type='text' size='1' name='group' value=".$row['G2']." </small></small></TD></TR></FORM>";
   }
   WHILE (
$row=mysql_fetch_array($resultalt));
   
   echo 
"\t</tr>\n";
   echo 
"</TABLE>";

}
?>
Los campos G1 son 'enum', tienen valor o ó 1, quiero poder ver el estado actual y en algunos casos modificarlos.
Con checkbox no puedo. He tratado de seguir unos ejemplos que Cluster posteó pero nada, o me quedan todos desmarcados o todos chequeados
Alquien podría ayudarme por favor.
Muchas gracias :)