Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $model=new Employee;
- if(isset($_POST['Employee']))
- {
- $_POST['Employee']['acc_id'] = Yii::app()->session['acc_id'];
- $model->attributes=$_POST['Employee'];
- if($model->save())
- $this->redirect(array('view','id'=>$model->emp_id));
- }
- $this->render('create',array(
- 'model'=>$model,
- ));
- <div class="row">
- <?php echo $form->labelEx($model,'emp_type'); ?>
- <?php echo CHtml::dropDownList('Employee[emp_type]', $model,Type::model()->jobTypesList,
- array('empty' => 'Select a job type'))?>
- <?php echo $form->error($model,'emp_type'); ?>
- </div>
- <?php echo CHtml::dropDownList('Employee[emp_type]', $model,Type::model()->jobTypesList,array('empty' => 'Select a job type'))?>
- <?php echo $form->dropDownList($model,'emp_type', Type::model()->jobTypesList,array('empty' => 'Select a job type'))?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement