CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Retrieve values from a checkbox list

Print topic Send  topic

Author Message
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];    
	}   
 
View profile  Send private message
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);  
       }
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 08/31/2010, 7:42 PM

alfonso,
Can you please add [RESOLVED] or [SOLVED] to the thread title. Thanks.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.