www.webdeveloper.com
Results 1 to 7 of 7

Thread: Getting Session Value Problem in joomla

  1. #1
    Join Date
    Jul 2012
    Posts
    32

    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.

  2. #2
    Join Date
    Mar 2009
    Posts
    452
    you may var_dump your session to see if the value is set properly

    var_dump($_SESSION);

  3. #3
    Join Date
    Sep 2011
    Location
    Bristol, England, United Kingdom
    Posts
    192
    Perhaps
    PHP Code:
    session_start() 
    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.

  4. #4
    Join Date
    Jul 2012
    Posts
    32
    I used var_dump() fuunction.Null is printing for username.

  5. #5
    Join Date
    Mar 2009
    Posts
    452
    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.

  6. #6
    Join Date
    Sep 2012
    Posts
    5
    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.

  7. #7
    Join Date
    Jul 2012
    Posts
    32
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles