public function likeAction() { $this->_helper->layout()->disableLayout(); $ns = new Zend_Session_Namespace("liked"); if (isset($ns->liked)) { echo "liked"; return; } if ($this->_request->isPost()) { $gameId = $this->_request->getPost('gameId'); if ($gameId) { $ns->liked = "1"; $mode_game = new Model_Game(); $returnVal = $mode_game->addLike($gameId); } } }