CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge -> Programming

 set of checkboxes ussing array - array is not transferred

Print topic Send  topic

Author Message
holyboy
Posted: 06/22/2004, 10:33 AM

i use custom field in record form to display set of chboxes, here's how:
$arr_services = db_fill_array("select serv_id, serv_name from max_services order by serv_id asc");  
if(is_array($arr_services))  
{   
  reset($arr_services);  
  while(list($serv_id, $serv_name) = each($arr_services))  
  {  
     $fldchbox_list .= "<input type=\"checkbox\" UNCHECKED name=\"service_id[]\" value=\"".$serv_id."\"> ".$serv_name."<br>";  
  }  
}  
in the effect, i can display nice set of chboxes named 'service_id ' and values from serv_id field.

unfortunately, when i pass this record form i receive:
Warning: Invalid argument supplied for foreach()
which means array was not transfered.
why?
Hmm
Posted: 07/10/2004, 2:16 AM

Try using 'isset' to check if the checkbox is checked.

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.