Update mysql database on change of activeCheckBox

I have an activeCheckBox that when the value is changed i want it to update the mysql database as soon as it is changed. I just started working with Yii and have only a little experience with php and javascript. here is the view code for the activeCheckBox:




 <td><?php echo CHtml::activeCheckBox($socket, "[$i]timer_enabled", array('class' => 'datarow_'.$i)); ?></td>



I was looking through the documentation an noticed a clientChange htmloption which has an ajax option which i thought could be useful to my situation but i’m not really sure. Can someone help point me in the right direction or show me how to incorporate the clientChange option?

Thanks

This may help you: http://www.yiiframework.com/forum/index.php?/topic/10895-use-clientchange-with-dropdownlist/page__p__53567__hl__clientChange#entry53567