views/layouts/default.ctp
On Aug 21, 6:53 am, kdubya <kenwin...@winanstech.com> wrote:
> On Aug 19, 9:01 am, zaboo <adambartholo...@gmail.com> wrote:
>
> > Don't echo $this->Session->setFlash()
>
> > On Aug 19, 8:27 am, Chander Bhan <gotob...@gmail.com> wrote:
>
> > > I always get the digit 1 in the next line of the message sent through
> > > Session->setFlash from controller, need help
>
> I don't understand this answer. I have been having the same problem
> (the number 1 being displayed on the line after the flash message).
> Here is the code snippet from my controller:
>
> function edit($id = null) {
> $this->set('schema', $this->Item->_schema);
> if (!$id && empty($this->data)) {
> $this->Session->setFlash(__('Invalid Item', true));
> $this->redirect(array('action'=>'index'));
> }
>
> And here is the code from the view:
>
> <?php echo $session->flash();?>
>
> Are you saying that in the view the code should be:
>
> <?php $session->flash();?>
>
> Is that correct?
>
> Thanks,
> Ken
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment