Im trying to make a login and admin panel for my site, and I get the following error on the login page;
- Code: Select all
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/genosco/public_html/index.php:14) in /home/genosco/public_html/admin/index.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/genosco/public_html/index.php:14) in /home/genosco/public_html/admin/index.php on line 2
And thus I cant even login, this the code I have for that page.
- Code: Select all
<?php
session_start();
include("database.php");
include("login.php");
?>
<?php
if($logged_in){
include('admin_body.php');
}else{
displayLogin();
}
?>