I'm trying to show a flash message as a result of a just sent form.
The code i used is the same as the one at contact-page except my form header:
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'feedbacks-form',
'enableAjaxValidation'=>false,
'action'=>'products/details',
)); ?>
I think my browser (Firefox 12) loads the "resulting page" from cache because when i set a new session var that i increment at each page visit, the counter doesn't refresh :
<?php if (Yii::app()->user->getState('foo')===NULL) {
Yii::app()->user->setState('foo',1);
} else {
$x=Yii::app()->user->getState('foo');
Yii::app()->user->setState('foo',++$x);
}
print_r(Yii::app()->user->getState('foo'));?>
The only way to show the flash message is:
<?php if (Yii::app()->user->hasFlash('feedback')):?>
<div class="flash-success">
<?php echo Yii::app()->user->getFlash('feedback');?>
</div>
<?php exit;endif;?>
But "exit" is not a solution

Help
















