function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for Contact',
true));
$this->redirect(array('action'=>'index'));
}
if ($this->Contact->del($id)) {
$this->Session->setFlash(__('Contact deleted', true));
$this->redirect(array('action'=>'index'));
}
}
On 7 Sep, 23:23, seanislegend <[EMAIL PROTECTED]> wrote:
> Hey,
>
> after I delete from a DB something I want to set a Flash message
> saying if it's successfully been deleted or if there was an error.
>
> I'm not sure how to implement this with afterDelete. Any ideas?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---