Create A Checkbox List And Each Checkbox Will Change Column Data

i have to make a checkbox list that will print all the columns except for ids, the table in database is called parametros which has id and parametro_id which doesnt have to be printed, but theres going to be more columns that are going to be created by the app which will just have data like 1-0 or true-false.

i dont know how checkbox list work and ive been trying to find some place that could explain all the ways that can be generated, im going to show the form generated by gii, model and action controller.

_form.php


<?php

/* @var $this ParametroController */

/* @var $model Parametro */

/* @var $form CActiveForm */

?>


<div class="form">


<?php $form=$this->beginWidget('CActiveForm', array(

	'id'=>'parametro-form',

	// Please note: When you enable ajax validation, make sure the corresponding

	// controller action is handling ajax validation correctly.

	// There is a call to performAjaxValidation() commented in generated controller code.

	// See class documentation of CActiveForm for details on this.

	'enableAjaxValidation'=>false,

)); ?>


	<p class="note">Fields with <span class="required">*</span> are required.</p>


	<?php echo $form->errorSummary($model); ?>


	<div class="row">

		<?php echo $form->labelEx($model,'nombre'); ?>

		<?php echo $form->textField($model,'nombre',array('size'=>60,'maxlength'=>256)); ?>

		<?php echo $form->error($model,'nombre'); ?>

	</div>


	<div class="row buttons">

		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>

	</div>


<?php $this->endWidget(); ?>


</div><!-- form -->

Parametro.php (Model)


<?php


/**

 * This is the model class for table "parametro".

 *

 * The followings are the available columns in table 'parametro':

 * @property integer $id

 * @property string $nombre

 */

class Parametro extends CActiveRecord

{

	/**

	 * @return string the associated database table name

	 */

	public function tableName()

	{

		return 'parametro';

	}


	/**

	 * @return array validation rules for model attributes.

	 */

	public function rules()

	{

		// NOTE: you should only define rules for those attributes that

		// will receive user inputs.

		return array(

//			array('nombre', 'required'),

//			array('nombre', 'length', 'max'=>256),

			// The following rule is used by search().

			// @todo Please remove those attributes that should not be searched.

			array('id', 'safe', 'on'=>'search'),

			array('hplocal', 'safe', 'on'=>'search'),

//			array('id, nombre', 'safe', 'on'=>'search'),

		);

	}


	/**

	 * @return array relational rules.

	 */

	public function relations()

	{

		// NOTE: you may need to adjust the relation name and the related

		// class name for the relations automatically generated below.

		return array(

		'peticion'=>array(self::BELONGS_TO,'Peticion','peticion_id'),

		);

	}


	/**

	 * @return array customized attribute labels (name=>label)

	 */

	public function attributeLabels()

	{

		return array(

			'id' => 'ID',

//			'nombre' => 'Nombre',

		);

	}


	/**

	 * Retrieves a list of models based on the current search/filter conditions.

	 *

	 * Typical usecase:

	 * - Initialize the model fields with values from filter form.

	 * - Execute this method to get CActiveDataProvider instance which will filter

	 * models according to data in model fields.

	 * - Pass data provider to CGridView, CListView or any similar widget.

	 *

	 * @return CActiveDataProvider the data provider that can return the models

	 * based on the search/filter conditions.

	 */

	public function search()

	{

		// @todo Please modify the following code to remove attributes that should not be searched.


		$criteria=new CDbCriteria;


		$criteria->compare('id',$this->id);

//		$criteria->compare('nombre',$this->nombre,true);


		return new CActiveDataProvider($this, array(

			'criteria'=>$criteria,

		));

	}


	/**

	 * Returns the static model of the specified AR class.

	 * Please note that you should have this exact method in all your CActiveRecord descendants!

	 * @param string $className active record class name.

	 * @return Parametro the static model class

	 */

	public static function model($className=__CLASS__)

	{

		return parent::model($className);

	}

}



ParametroController.php (Action)


	public function actionCreate()

	{

		$model=new Parametro;


		// Uncomment the following line if AJAX validation is needed

		// $this->performAjaxValidation($model);


		if(isset($_POST['Parametro']))

		{

			$model->attributes=$_POST['Parametro'];

			if($model->save())

				$this->redirect(array('view','id'=>$model->id));

		}


		$this->render('create',array(

			'model'=>$model,

		));

	}

you can see almost nothing is altered, but is just that im trying to figure out how to start, the columns that are going to be created by app are going to be called like "ph, h1, ho3, etc…". So i want to do a checkbox list that will print all thoses columns created by the app and when you select some of them and press submit, the boxes checked are going to be saved by specific column as 1 or true.

please help.