Re: Multiple Session Buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, July 13, 2007 6:20 pm, Al wrote:
> Is there a way to instigate 2 separate named session buffers? They
> will contain different data.

I don't see how you could, since you'll be changing the contents of
$_SESSION which doesn't let you specify which of the two you are
messing with...

You could maybe do something like:

<?php
  //session #1
  session_set_cookie_params(...);
  session_start();
  //change $_SESSION
  session_write_close();
  //session #2
  session_set_cookie_params(...);
  session_start();
  //change $_SESSION
  session_write_close();
?>

But it's an awful lot of discipline to organize your code like that...

What might be easier would be to have a common session, but store all
the data sensibly so that the division is in $_SESSION data, rather
than actual separate sessions.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux