CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Nicole need your help

Print topic Send  topic

Author Message
wanaka
Posted: 03/16/2004, 7:51 PM

I am using codecharge studio to add a checkbox and add some custom code to update / delete those checked item. The strange thing is if three items are checked it can only delete the first one not three.


global $device;
$engineercheck = $device->engineer_list->Value;
foreach($engineercheck as $key=>$value) {
if($key=='Y')
{
$db = New clsDBeontap();
$SQL = "DELETE FROM device_owner WHERE owner_id=" . "'" . "$value" ."'";
$db->query($SQL);
unset ($db);
}
}
Nicole

Posts: 586
Posted: 03/17/2004, 1:35 AM

Hello,
As I understand engineer_list is CheckBoxList on a form. If so than you're using incorrect way to retrieve its list of values as array. Try
  
$check = CCGetFromPost("CheckBoxList1", array());  
instead of
  
$engineercheck = $device->engineer_list->Value;  

BTW, you can check ManyToManycheckbox example (events code) from CCSExample pack solution for a code.

_________________
Regards,
Nicole
View profile  Send private message
fausto
Posted: 03/24/2004, 2:42 PM

Hello,

Try:

$engineercheck = $device->engineer_list->GetValue();

to retrieve a component value instead of your line 2.

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.