then in the view (or the layout) you can add

<?php if ($session->check('Message.flash'))
{
        $session->flash();
}  ?>

to insert it into the view

On 12/6/06, DJ Spark <[EMAIL PROTECTED]> wrote:
>
>  Usually i do something like this:
>
> function del($id = null)
> {
>    if ($this->Model->del($id))
>    {
>        $this->Session->setFlash("Article $id has been
> deleted");
>    }
>    else
>    {
>        $this->Session->setFlash("Article $id could not be
> deleted");
>    }
>    $this->redirect('/abc');
> }
>
>   Would it work for you ?
>
>   Spark
>
>
>  On 12/6/06, gabordemeter <[EMAIL PROTECTED]> wrote:
> >
> > I have a controller abc which has two actions: an index() action which
> > lists a series of records (from a db table) and a del() action.
> >
> > Each record in the list has a delete button (abc/del/id).
> >
> > If pressed, the del() action in the controller will run.
> >
> >         function del($id = null)
> >         {
> >                 $this->Model->del($id);
> >                 $this->redirect('/abc');
> >         }
> >
> >
> > What I would like to do is display a "delete successful" message in the
> > index view when the user comes from the del() action. Is there any way
> > for me to set the message in the del() action and then pass it over to
> > the index() action so that it gets displayed?
> >
> > Thanks!
> >
> >
> >
> > [livesets] http://djspark.com.br/mp3
> > > >
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to