best way to tell user a notification like 'sucess' or 'error' in mvc
hallo im trying to do something like
$this->model->users->updateData ( $e );
$this->messenger->setMessage('Updated');
# tells that hello user the data is updated!
redirect ( '/edit/profile' );
# trying to update the data, the main problem when redirect all the data is gone
heres are the options
- use sessions to put the message in then deletes if its showed
- use ?updated on urls get it with a is_get or something like that
- use ajax to upda开发者_Python百科te the new data on the edit/profile
or there is a better way on doing this ?
The Flash Messenger Helper may be what you are looking for.
http://framework.zend.com/manual/en/zend.controller.actionhelpers.html
精彩评论