You are here: Why are session variables not working for me?? « PHP Programming Language « IT news, forums, messages
Why are session variables not working for me??

Posted by bizt on 12/19/07 11:06

Hi,

I am trying to register session variables in the following way:

$_SESSION['myname'] = 'Burnsy';

When i set them and then output the following on the same script:

echo $_SESSION['myname']

... it works, but when I navigate to a different page from the one that
sets the variables it doesnt remember them and I get an error message:

Notice: Undefined index: myname in C:\webserver\Apache2\htdocs\admin
\includes\include.AuthProcess.php on line 20

I have DEFINETELY remembered to use session_start() at the very start
of my scripts. I am setting the variables inside a class but Im
echo'ing then from the running script .. should this matter? Do I need
to do anything in php.ini or something like that? Is it maybe using
cookies for sessions? If so, I dont know a great deal about this ..
please briefly explian what I should do. Any help would be much
appreciated. Thanks

Burnsy

 

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

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