----- Original Message -----
From: "Bob Sawyer" <[EMAIL PROTECTED]>
To: "PHP List" <[email protected]>
Sent: Tuesday, May 03, 2005 9:59 PM
Subject: [php-list] Brain-Freeze causing $_SESSIONs problem
...
[deleted]
...
>
> My code doesn't seem to want to do that:
>
> ------------------------------------------
>
> // determine which station we're dealing with
> // if not in the $_GET array, try to pull it from $_SESSION
> // grab the station ID
>
> if ((is_array($_GET)) && isset($_GET['station'])) {
> $station = $_GET['station'];
> session_start();
> if (!isset($_SESSION['station'])) {
> $_SESSION['station'] = $station;
> }
> }
>
Im confused with the following lines...
why do you have to put a conditional 'if',
if they both lead to the same action?
which is:
$_SESSION['station'] = $station;
> // set a session var so we don't have to keep passing the var
> session_start();
> if (!isset($_SESSION['station'])) {
> $_SESSION['station'] = $station;
> } elseif (isset($_SESSION['station'])) {
> $_SESSION['station'] = $station;
> }
> $station = $_SESSION['station'];
>
> // continue with code that uses the $station var to
> // set a number of other variables..
>
> ----------------------------------------------
>
> After changing station sites and returning to the automotive site, the
> first page or two will have the correct station graphics displayed;
> after that, it returns to the previous station's graphics.
>
> This code resides in the header file of each page, btw.
>
> Would someone mind helping me sort this out?
>
I think I've got some similiar problem back in the last year,
my workaround is using session_cache_limiter() + session_write_close()
Thats if I could understand your problem correctly.
> Thanks,
> -Bob
>
>
Donny.
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/