camNZ Posted June 24, 2006 Share Posted June 24, 2006 Hello, I would like to utlise the tep_session function and basically create a new variable which I can access from each page. Normally I would create this by doing the following: $_SESSION["myVar"] = "Hello"; How would I create a new session variable using the tep_session function and then how would I retrieve it again? Many thanks, Campbell Link to comment Share on other sites More sharing options...
Jan Zonjee Posted June 24, 2006 Share Posted June 24, 2006 How would I create a new session variable using the tep_session function and then how would I retrieve it again? See how that is done in login.php. $_SESSION['myVar'] will do the job of retrieving it (if set of course). To see if it is registered there is a function called tep_session_is_registered. Link to comment Share on other sites More sharing options...
camNZ Posted June 24, 2006 Author Share Posted June 24, 2006 Hi, Sorry, I didnt quite understand that. Are you saying I can create a new session variable called "myVar" by doing the following: tep_session_register('myVar'); Then assign a value to it: $myVar = 100; Then to retrive it i would do this: $myVarValue = tep_session_register('myVar'); Thanks, Campbell Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.