I am using CakePHP 1.2.0.5146. I am trying to write a session variable
using
$this->Session->write('alpha',15);
in users_controller.php for "add" action as follows:
function add() {
$success = false;
if(!empty($this->data)) {
$this->cleanUpFields();
$user_input = $this->data['User']['verify'];
echo 'User input is : '.$user_input;
echo 'Expect input is : '.$this->Session->read('alpha');
$success = true;
}
if (!$success)
{
$this->Session->write('alpha',15);
}
}
When the form is posted, in expected input, I am not able to see the
session variable alpha which I had set during the intial view. Can
someone point me in right direction what's wrong?
I know that session variable is set because when I look into database
for session entry, I do see the variable 'alpha' declared as 15 in the
data column. But somehow it is not shown when the form is posted or
read is requested!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---