|
Posted by flintridgeparkenfarker vonkerschnauzerheiden on 07/24/05 15:29
"CyberDog" <milan-SPAM-@cdnforum.com> wrote in message
news:dbvq08$7p1$1@ss405.t-com.hr...
> flintridgeparkenfarker vonkerschnauzerheiden wrote:
> > I'm new to PHP and although it seems like a powerful construct, I'm
getting
> > very frustrated dealing with sessions. My results seem inconsistent.
> >
> > I'm simply trying to access the $_SESSION[] variables when I return to
the
> > page with the following code in it but they are always empty--I've tried
> > moving/removing session_start() but nothing seems to work--the variables
are
> > empty when I return to this page:
> cut
>
> You don't need that cookie stuff, php does it automaticly...
>
> all you need to do to use sessions is:
>
> <?
> sessin_start();
>
> $_SESSION['mytest'] = "wee";
> ?>
>
> page two:
>
> <?
> session_start();
>
> echo $_SESSION['mytest'];
> ?>
>
>
> Hope you get the point :)
>
>
Thanks CyberDog, I get the point, I think. I have gotten the $_SESSION
variables to work in other tests that didn't use cookies, but could it be
the cookies giving me the problems? Because I see that SID doesn't work if
the cookie is successfully written, which is bizarre behavior in my opinion.
> --
> Prvi hrvatski MMORPG:
> http://omega17.net
Navigation:
[Reply to this message]
|