You are here: Re: newbie session question « PHP Programming Language « IT news, forums, messages
Re: newbie session question

Posted by Jerry Stuckle on 08/20/07 01:19

Morlaath@gmail.com wrote:
> This is the important code from the index page which is causing the
> error:
>
> <?php
> if($_SESSION['logged']) { ?>
> <td class="welcome" ><b>You are logged in as <?php echo
> $_SESSION['username']; ?>.&nbsp;
> <a href="" onclick="//used to have session_destroy() here">Logout</
> a></b></td>
> <?php } else { ?>
> <td class="welcome"><b>You are not logged in. &nbsp;<a
> href="forms/login.php">Login here</a></b></td>
> <?php } ?>
>

Do you call session_start() at the start of your index.php page? And
are you sure you're calling session_start() only once, and before *any*
output (even white space) on all other pages where you're using sessions?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.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

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