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!
>
>
> >
>


-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br/mp3


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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