-4
I’m doubtful what name to put in the PHP method below:
public function checkbox($idForm)
{
$list = $this->v->getAllInAssocArr();
foreach ($list as $key => $val) {
$isRel = $this->v->isRel($idForm, $key);
if (self::isPost($key) && !$isRel) {
$this->v->insert($idForm, $key);
}
if (!self::isPost($key) && $isRel){
$this->v->delete($idForm, $key);
}
}
}
It add or remove Data in DB as selected posts in the form checkbox. thought I’d put "updateCheckboxByIdForm" but it does not update
What do you mean by "it doesn’t update"? You can put the name you want. In my opinion, "updateCheckboxByIdForm" means nothing better than the original name. Depends on the form for being "checkbox_signup" or "checkbox_client" etc...
– Peter
about "does not update" . I meant that the method was not done to update the data. just "inserts" or "removes" so I found it strange to put "update ..." as the name for the method ...
– Estefanio NS