[jQuery] Jquery, AJAX, and php session variables

[jQuery] Jquery, AJAX, and php session variables

Ah, it's actually not... here's the breakdown of the
included files:
index.php (sample "normal" page which has the login
box in it)
(included at start of index.php)
-page_init.php
(included at start of page_init.php)
-dbconnect.php //connects database
-startsession.php //CALLS SESSION_START() and
contains object-like fns for session handling
-header.php (included after page_init.php. DOES NOT
call session_start as it's already called in
page_init.php's included startsession.php page.
Contains all of the jquery/ajax which you mentioned
below, and all HTML header stuff)


--- Aaron Heimlich <aaron.heimlich@gmail.com> wrote:
> Question: is session_start() called on the page
> where this code is run?
>
> var loggedin = <?=$_SESSION['loggedin']?>;
>
> if (loggedin == true)
> {
>
> $("div#login").hide();
> $("div#logout").unhide();
> }
> else
> {
> $("div#login").unhide();
> $("div#logout").hide();
> }
>
> On 3/30/07, Kim Johnson <egypt1an@yahoo.com> wrote:
> >
> > I am indeed not using output buffering. I call
> > session_start as the first thing on every page,
> before
> > the headers are sent. I also call session_start on
> my
> > login page, first thing.
> >
> > If I use output buffering, do you think that would
> fix
> > things? I could call session_start() again as a
> > callback function after the ajax finishes,
> perhaps...?
> >
> > thanks,
> > -kim
> >
> > --- Aaron Heimlich <aaron.heimlich@gmail.com>
> wrote:
> >
> > > On 3/30/07, Kim Johnson <egypt1an@yahoo.com>
>