Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Posts
    4
    Plugin Contributions
    0

    Default Session variables assignments

    Hello. I'd like to use some global variable for my site. I'm going to store this variable in session and all other modules/files should take variable from $_SESSION array.

    There is special links, looking like this: <a href="...&tab=1">... and <a href="...&tab=2">. Then I set session variable in overrided tpl_index_default.php: $_SESSION['tab'] = $_GET['tab'] (not exactly, but it's simpler).

    I use this variable in overrided categories.php. And in categories.php I see old session variable. I.e. if user click on first link, session variable will not be set at all. Then when user click on second link, categories.php says that session variable is "1". categories.php called earlier than tpl_index_default.php for sure!

    So where I should place session variable assignment? I could do it in html_header.php but I can't override it and don't want to modify that file.

    Thank you.

  2. #2
    Join Date
    Aug 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Session variables assignments

    Oh, I found solution. I should place tpl_header.php into /my_template/common. Then it works.

 

 

Similar Threads

  1. Login session variables
    By xtjx09 in forum General Questions
    Replies: 5
    Last Post: 14 Aug 2010, 04:47 AM
  2. printing session variables
    By Amit001 in forum General Questions
    Replies: 1
    Last Post: 26 Nov 2009, 01:12 PM
  3. Add Session Variables
    By santoshshaw in forum General Questions
    Replies: 1
    Last Post: 8 Nov 2007, 11:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg