Flash Data Not work.


(Renuka) #1

Hi,

Its working in chrome not working in firefox Why?

Cant Set flash Data in my Site,

In My controller,

if($model->save())

{


Yii::app()->user->setFlash('success', 'Your Message Send Successfully..'); //Set flash Data


	


$this->redirect(array('view'));


}

In my view Page:

I get flash Data:

foreach (Yii::app()->user->getFlashes() as $key => $message) {

                    echo '<div class="alert alert-' . $key . ' "><a href="#" class="close" data-dismiss="alert">×</a>' . $message . "</div>";


                }

But Cant get flash data,and also try like these,

<?php if(Yii::app()->user->hasFlash(‘success’)){?>

&lt;div class=&quot;alert alert-success&quot;&gt;


    &lt;?php echo Yii::app()-&gt;user-&gt;getFlash('success'); ?&gt;


&lt;/div&gt;

<?php }

?>

But this code also not working please give me solution for my issue.