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']; ?>.
> <a href="" onclick="//used to have session_destroy() here">Logout</
> a></b></td>
> <?php } else { ?>
> <td class="welcome"><b>You are not logged in. <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
==================
[Back to original message]
|