Zend Framework - storing and retrieving cookies

ErmaVoit

New Member
I try to put the user's email in a cookie when he logs in, and retrieve it at his next visit.The code below doesn't work, obviously I am missing something.When user submits login info, store the email in cookie:$cookie = new Zend_Http_Cookie('emailLogin', urlencode($email), 'localhost');At the next user's visit, retrieve the user's email: $email = $this->_request->getCookie('emailLogin');(I had already a debate in #zftalk on why I need to store the email in cookie, I don't want to discuss that again please)
 
Back
Top