Ver Mensaje Individual
  #5 (permalink)  
Antiguo 28/08/2008, 15:00
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 18 años, 5 meses
Puntos: 3
Respuesta: Guardar seleccion del checkbox

Código PHP:
      <td width="9%"><span class="boxtext">
      <
div align="right"><em><strong>Clase</strong></em>:</div></td>
      <
td width="3%"><span class="boxtext">A1</td>
      <
td width="4%"><input type="checkbox" name="ar_tiplic" value="A1" /></td>
      <
td width="3%"><span class="boxtext">A5</td>
      <
td width="15%"><input type="checkbox" name="ar_tiplic" value="A5"></td>
      <
td width="2%">&nbsp;</td>
      <
td width="17%"><div align="right"><span class="boxtext"><strong><em>Ley</em></strong>:</div></td>
      <
td width="6%"><span class="boxtext">18.290</td>
      <
td width="41%"><input type="checkbox" name="ar_ley" value="18.290"></td>
    </
tr>
    <
tr>
      <
td>&nbsp;</td>
      <
td><span class="boxtext">A2</td>
      <
td><input type="checkbox" name="ar_tiplic" value="1" /></td>
      <
td><span class="boxtext">B</td>
      <
td><input type="checkbox" name="ar_tiplic" value="B "></td>
      <
td>&nbsp;</td>
      <
td><div align="right"></div></td>
      <
td><span class="boxtext">19.495</td>
      <
td><input type="checkbox" name="ar_ley" value="19.495"></td>
    </
tr>
    <
tr>
      <
td>&nbsp;</td>
      <
td><span class="boxtext">A3</td>
      <
td><input type="checkbox" name="ar_tiplic" value="A3" /></td>
      <
td><span class="boxtext">C</td>
      <
td><input type="checkbox" name="ar_tiplic" value="C "></td>
      <
td>&nbsp;</td>
      <
td><div align="right"></div></td>
      <
td><span class="boxtext">20.060</td>
      <
td><input type="checkbox" name="ar_ley" value="20.060"></td>
    </
tr>
    <
tr>
      <
td>&nbsp;</td>
      <
td><span class="boxtext">A4</td>
      <
td><input type="checkbox" name="ar_tiplic" value="A4" /></td>
      <
td><span class="boxtext">D</td>
      <
td><input type="checkbox" name="ar_tiplic" value="D "></td>
      <
td>&nbsp;</td>
      <
td><div align="right"></div></td>
      <
td><span class="boxtext">19.710</td>
      <
td><input type="checkbox" name="ar_ley" value="19.710"></td>
    </
tr
archivo donde guarda

Código PHP:
<?
        $ley 
implode(',',$ar_ley);
        
$tiplic implode(',',$ar_tiplic);

        
$ing_itm "INSERT INTO am_operador(op_id,op_nomop,op_apeop,op_rut,op_cel,op_equcer,"
                   
."op_tiplic,op_resolu,op_municipalidad,op_ley,op_control,op_restricciones,op_especificaciones,"
                   
."op_destino,op_tipo) "
                   
."VALUES ('$f_folio','$ar_nomop','$ar_apeop','$rut','$ar_celular','$ar_equcer',"
                   
."'$tiplic','$f_codest','$ar_muni','$ley','$ar_control','$ar_restricciones','$ar_especificaciones',"
                   
."'$ar_destino','$ar_tipo')";
        
$ret db_query($ing_itm) or die(db_error());

?>
solo no me guardan los archivos con checkbox ($ar_ley, $ar_tiplic)

no me guarda nada, y cuando lo hago directo (sin el implode) solo me guarda 1 seleccion, y los demas checkbox no se guardan.