Hi all,
I need to set a session variable based on what button is pressed in the submitting form. I have used the code below, but when I check for the variable in the next form as a test, it is empty. Why?
BTW, the button name is not an issue as I use similar code to redirect and this works fine.
aj
I need to set a session variable based on what button is pressed in the submitting form. I have used the code below, but when I check for the variable in the next form as a test, it is empty. Why?
BTW, the button name is not an issue as I use similar code to redirect and this works fine.
aj
<?php
$action = JRequest::getString('rf1sBtn');
$session =& JFactory::getSession();
if (strcasecmp($action, 'Yes') != 0)
{
$session->set('sessionchangedDetails', 'yes');
}
else
{
$session->set('sessionchangedDetails', 'no');
}
?>