You are here: Re: $_SESSION problems « All PHP « IT news, forums, messages
Re: $_SESSION problems

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация