/ Published in: PHP
                    
                                        
This allows any data to be temporarily saved in a user session (for both anonymous visitors and frontend users).  The data is temporary though and will be destroyed once the user's cookie has expired.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
/* Save preference to user session */
$GLOBALS["TSFE"]->fe_user->setKey("ses","tx_cfcampus_api", $campusUID);
$GLOBALS["TSFE"]->fe_user->sesData_change = true;
$GLOBALS["TSFE"]->fe_user->storeSessionData();
/* Retrieve preference from user session */
$campusUID = $GLOBALS["TSFE"]->fe_user->getKey("ses","tx_cfcampus_api");
Comments
 Subscribe to comments
                    Subscribe to comments
                
                