Menu

Using Session Variables

Help
Anonymous
2002-04-29
2002-10-08
  • Anonymous

    Anonymous - 2002-04-29

    Maybe this is a stupid question, ... so..

    I use the $sess->register($var) to register a variable but when I want to use it I don't know how to do that.
    I tried things like $sess->var or $sess->GLOBALS["var"] without sucess.

    Someone can give me the magic sintax ;)
    Thanks

     
    • Richard Archer

      Richard Archer - 2002-04-29

      $var

      :)

       
    • Anonymous

      Anonymous - 2002-05-01

      Hi Richard,

      I appreciate your help, but I tried this without success.
      I want to register a value in a session variable so that I can use it in other page, in other circunstance, wharever, but just call the variable through the name I've registered like you said doen't work here ;((

       
      • Layne Weathers

        Layne Weathers - 2002-05-01

        You're registering incorrectly.

        $sess->register("var");
        $var = "Hello, World!";

        The name of the variable is what is registered, you've been sending the value of the variable.

         
    • Anonymous

      Anonymous - 2002-05-02

      Dargh :) ehheeh
      I love you !!
      thks a lot

       
    • Anonymous

      Anonymous - 2002-07-05

      BTW, session registered variables don't work if you have "allow_cache" set to no. Ack!

       
      • Anonymous

        Anonymous - 2002-07-05

        And, I forgot to say, you are in SSL mode.

         
        • Hmm

          Hmm - 2002-10-08

          What, do you really have to be in SSL-mode to use session-variables?

           
    • Layne Weathers

      Layne Weathers - 2002-10-08

      No, he's saying that registered variables don't work IF you are in SSL AND have set 'allow_cache' to no.

       

Log in to post a comment.