You are here: Re: problem with session variables « PHP Programming Language « IT news, forums, messages
Re: problem with session variables

Posted by Pedro Graca on 10/10/06 01:17

Garry Jones wrote:
> "Garry Jones" <garry.jones@morack.se> skrev i meddelandet
> news:eged1e$s38$1@yggdrasil.glocalnet.net...
>> This problem is persisting.

[...]

> At the top of the page that will process the form code I have this line.
> session_start();
> echo $_SESSION['testvar'];

Try this in the page that will process the form code

if (!headers_sent()) {
session_start();
echo $_SESSION['testvar']
} else {
echo 'Cannot start session. Headers have already been sent.';
}

Then, if it complains with "Cannot start session. ..." move the lines up
in the source code until it stops complaining.


Links:
http://www.php.net/headers_sent
http://www.php.net/session

--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

 

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

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