clearing out all $_SESSOIN variables?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D. Alvarado

    clearing out all $_SESSOIN variables?

    Hello,
    In a particular session, I set a bunch of $_SESSION vars. Is
    there any way of erasing/purging all of them in one fell swoop or must
    I iterate through each one or even list them out ...

    $_SESSION["a"] = "";
    $_SESSION["b"] = "";

    ..... etc.

    I'm using PHP 4. Thanks for your help, - Dave
  • Michael Vilain

    #2
    Re: clearing out all $_SESSOIN variables?

    In article <9fe1f2ad.04102 22017.1137fae7@ posting.google. com>,
    laredotornado@z ipmail.com (D. Alvarado) wrote:
    [color=blue]
    > Hello,
    > In a particular session, I set a bunch of $_SESSION vars. Is
    > there any way of erasing/purging all of them in one fell swoop or must
    > I iterate through each one or even list them out ...
    >
    > $_SESSION["a"] = "";
    > $_SESSION["b"] = "";
    >
    > .... etc.
    >
    > I'm using PHP 4. Thanks for your help, - Dave[/color]

    Why do you want to do that?

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Comment

    • Pjotr Wedersteers

      #3
      Re: clearing out all $_SESSOIN variables?

      D. Alvarado wrote:[color=blue]
      > Hello,
      > In a particular session, I set a bunch of $_SESSION vars. Is
      > there any way of erasing/purging all of them in one fell swoop or must
      > I iterate through each one or even list them out ...
      >
      > $_SESSION["a"] = "";
      > $_SESSION["b"] = "";
      >
      > .... etc.
      >
      > I'm using PHP 4. Thanks for your help, - Dave[/color]

      $_SESSION = Array ();
      HTH
      Pjotr


      Comment

      • Pjotr Wedersteers

        #4
        Re: clearing out all $_SESSOIN variables?

        Pjotr Wedersteers wrote:[color=blue]
        > D. Alvarado wrote:[color=green]
        >> Hello,
        >> In a particular session, I set a bunch of $_SESSION vars. Is
        >> there any way of erasing/purging all of them in one fell swoop or
        >> must I iterate through each one or even list them out ...
        >>
        >> $_SESSION["a"] = "";
        >> $_SESSION["b"] = "";
        >>
        >> .... etc.
        >>
        >> I'm using PHP 4. Thanks for your help, - Dave[/color]
        >
        > $_SESSION = Array ();
        > HTH
        > Pjotr[/color]

        Forgot: or use Session_unset ()


        Comment

        • Theo

          #5
          Re: clearing out all $_SESSOIN variables?

          "Pjotr Wedersteers" <pjotr@wederste ers.com> wrote in news:417a0a8d$0
          $78749$e4fe514c @news.xs4all.nl :
          [color=blue]
          > Pjotr Wedersteers wrote:[color=green]
          >> D. Alvarado wrote:[color=darkred]
          >>> Hello,
          >>> In a particular session, I set a bunch of $_SESSION vars. Is
          >>> there any way of erasing/purging all of them in one fell swoop or
          >>> must I iterate through each one or even list them out ...
          >>>
          >>> $_SESSION["a"] = "";
          >>> $_SESSION["b"] = "";
          >>>
          >>> .... etc.
          >>>
          >>> I'm using PHP 4. Thanks for your help, - Dave[/color]
          >>
          >> $_SESSION = Array ();
          >> HTH
          >> Pjotr[/color]
          >
          > Forgot: or use Session_unset ()
          >
          >
          >[/color]

          or use both? I think the manual uses that as an example.

          Comment

          Working...