title: how to set and display flash messages in symfony1.4
body: <p>i am creating a login form in which i have to set a flash message if login fails. i have used the following code to set flash message. 
  In actions.class.php inside that a function called executeLogin_process </p>
  
  <pre><code>$this-&gt;getUser()-&gt;setFlash('error', 'Invalid User Name or Password', false);
  $this-&gt;redirect('login/index');
  </code></pre>
  
  <p>and to display the message in indexSuccess.php</p>
  
  <pre><code>&lt;?php if ($sf_user-&gt;hasFlash('error')): ?&gt;
    &lt;div class="flash_error"&gt;&lt;?php echo $sf_user-&gt;getFlash('error') ?&gt;&lt;/div&gt;
  &lt;?php endif ?&gt;
  </code></pre>
  
  <p>By using this i am not able to display the error messages.i don't know whether i am using the right code or not. Any one please help me...</p>