Hello,
I am getting this header error and can't figure out how to correct it,
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/folder/main.php:12) in /home/content/folder/top_line.php on line 5
Here is my code...
<?php
require_once 'config.php';
if (!session_id()) session_start();
if (empty($_SESSION['user_id'])) { ?>
<tr>
<td id="user_menu">
<div class="minilogin">
<form action="<?php echo $site_base; ?>/login.php"
method="post">
<input type="hidden" name="submit" value="Login"
/>
<label for="user_login">Login:</label>
<input id="user_login" name="login" size="30"
type="text" />
<label for="user_password">Password:</label>
<input id="user_password" name="password"
size="30" type="password" />
<button name="commit" type="submit"
value="Login">Login</button>
No account? Register FREE <a href="<?php echo
$site_base; ?>/signup.php">here</a>
</form>
</div>
</td>
</tr>
<?php } else { ?>
<tr>
<td id="user_menu">
<div class="minilogin">
Welcome <?php echo
htmlspecialchars($_SESSION['username']); ?> |
<a href="<?php echo $site_base; ?>/my_account.php">My
Account</a> |
<a href="<?php echo $site_base; ?>/logout.php">Logout</a>
</div>
</td>
</tr>
<?php }
Please advise...
Thanks