alfonso
Posts: 121
|
| Posted: 08/27/2010, 2:36 AM |
|
Hi guys,
I´m trying to retrieve values from a checkbox list but isn´t work for me, only retrieve the first value, how can i do for retrieve all the values?
$int_reserva_sala->CheckBoxList1->Multiple=True;
$lista=implode($int_reserva_sala->CheckBoxList1->GetText());
for($c = 0; $c < sizeof($lista); $c++)
{
echo $lista[$c];
}
|
 |
 |
alfonso
Posts: 121
|
| Posted: 08/30/2010, 3:26 AM |
|
I answer myself
I put this code in after insert custom code:
$id_medio=0;
$listado = array();
$listado = CCGetFromPost("CheckBoxList1",array());
$id_reserva= mysql_insert_id();
reset($listado);
while(list($key,$id_medio) = each($listado)){
$db = new clsDBConnection1();
$SQL = "INSERT INTO int_rel_reservas_medios (id_reserva, id_medio) VALUES (".$id_reserva.",".$id_medio.")";
$db->query($SQL);
}
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 08/31/2010, 7:42 PM |
|
alfonso,
Can you please add [RESOLVED] or [SOLVED] to the thread title. Thanks.
|
 |
 |
|