开发者

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

  1. use sessions to put the message in then deletes if its showed
  2. use ?updated on urls get it with a is_get or something like that
  3. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜