Getting Session Value Problem in joomla
I am using flexi custom module in joomla 1.5.By using that i desinged form.I want to get the session value in the form.How to get.I tried like this $_SESSION['variable name'].It is not coming.
you may var_dump your session to see if the value is set properly
I've used Joomla! quite a bit, but I can't recall if you would need to use the session_start() function. As ZABI said, check to see if your sessions contain anything/exist.
I used var_dump() fuunction.Null is printing for username.
if var_dump($_SESSION['username']); returns NULL then this value is not set, and if var_dump($_SESSION); returns NULL probably session is not started at all.
If you are using joomla, then use this instruction:
JRequest::getVar( 'VARIABLE_NAME' , 'NULL_VALUE' );
This is a function that search your variable in post and get data and also in session and return a value of your variable or NULL_VALUE that you set if isnt' exists.
I am checking login details out side of the template.And then i am placing username value in session.Is it possible to get session value inside of the template.
Users Browsing this Thread
There are currently 1 users browsing this thread.
(0 members and 1 guests)