hey anybody knows how to get the session details of the current loged-in user
what i want to do is,to get the username of the current user and put it in a text field
<?php $uuser = Yii::app()->user->name; ?>
<?php echo $form->dropDownList($model,'from',$this->getUserOptionsgrade()); ?> //username dropdown
<?php echo $uuser; ?>
this is what i have done,this displays the username but i can’t put it inside a textfield
please help me
sukunj
(Mendparasukunj27)
2
Use following code:
<?php $uuser = Yii::app()->user->name; ?>
<?php echo $form->dropDownList($model,‘from’,$uuser, array(‘empty’ => ‘Select’,‘tabindex’=>1)); ?>
thanks for your help
after analyzing what u have said i corrected my code as following and now its working
thank you very much
<?php $uuser = Yii::app()->user->name; ?>
<?php echo $form->textField($model,'from',array('value'=>($uuser))); ?>