Re: session
| From: | Nate | Date: | Wed, 03 Apr 2002 02:21:27 +0000 |
| Subject: | Re: session | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91252@lists.php.net to get a copy of this message | ||
Opps ... sorry I jumped too soon at answering that..
But from what I can tell the header function is screwing you up probly
because it is like a redirect.
If you register session data I would think it would have to be sent in the
header to the client..
Maybe a workaround would be to echo vb or java script to redirect instead of
redirecting from the server..
That way the header info would be written...
so try this... in place of the header function...
echo "<script language='vbscript'>\n";
echo "location.href=\"retief.php?".SID."\"\n";
echo "</script>\n";
"Nate" <sonicysa@hotmail.com> wrote in message
news:20020403014127.11064.qmail@pb1.pair.com...
> Try establishing the variables first then register them as session
> variables.
> I guess you can't access the session variable directly so that may also
mean
> you cannot set the session variable if you have nothing to actually put in
> it... : )
>
>
> "R. Lindeman" <rlindeman@filenexus.com> wrote in message
> news:20020402210656.33887.qmail@pb1.pair.com...
> > okay i've posted something before here are my scripts either you tell me
> > what i do wrong or i'll go beserk
> >
> > you can check the outcome of the code on the following adress
> >
> > http://www.filenexus.com/piet.php
> >
> > here's the code for piet.php :
> >
> > <?php
> >
> > // open session and begin registering values
> >
> > session_start();
> >
> > session_register("fubar1");
> > session_register("fubar2");
> > session_register("fubar3");
> >
> > $fubar1 = "Remko";
> >
> > $fubar2 = "Lindeman";
> >
> > $fubar3 = "I3M1I";
> >
> > header("Location: retief.php?".SID);
> >
> > ?>
> >
> > here's the code for retief.php :
> >
> > <?php
> >
> > // begin the retrieval of propagated values
> >
> > $remko = $HTTP_SESSION_VARS["fubar1"];
> > $lindeman = $HTTP_SESSION_VARS["fubar2"];
> > $klas = $HTTP_SESSION_VARS["fubar3"];
> >
> > echo $remko;
> > echo $lindeman;
> > echo $klas;
> >
> > ?>
> >
> >
> > the problem is that the values don't get registered
> >
> >
>
>