Which version of Cake are you using?

There's no need to check for the presence of a message; ->flash() takes care of 
that for you.

On 1.3:
echo $this->Session->flash();

On 1.2:
$this->Session->flash();

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jul 2010, at 05:58, StephenE wrote:

> 
> Hello, newbie here.  I cannot get setFlash() to display a message on
> my view page.
> 
> In the controller:
> 
> $this->Session->setFlash('Please enter the correct number.',
> 'register', array('class' => 'error-message'));
> 
> In the view page register.ctp:
> 
> <?php if ($session->check('Message.flash')) { $session->flash();}?>
> 
> This seems so simple.  What am I doing wrong?  Thanks for the help!
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to