Here department is my table it contains only two fields id and department. My model name is also department.
This is my form
<?php echo $form->labelEx($model, ‘department’); ?>
<select name="department">
<option value="select">select</option>
<?php for($i=1;$i<30;$i++) {?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?Php } ?>
</select>
While I clicking create button the value is inserted in the database is always one if I select any number the value is inserted is 1 can you help me please .
Thanks in advance .