Hi im creating a simple register and login script in PHP but i get these errors when i load the login page.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Users\s14\phase2\index.php:8) in C:\Users\s14\phase2\index.php on line 10
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Users\s14\phase2\index.php:8) in C:\Users\s14\phase2\index.php on line 10
From line 6 to 20 of my code
<form action="index.php" method=get>
<h1 align="center" style="color:gray" >Welcome to this simple application</h1>
<?php
error_reporting(E_ALL & ~E_NOTICE);
session_start();
if( $_SESSION["logging"])
{
print_secure_content();
}
else {
if(!$_SESSION["logging"])
{
$_SESSION["logging"]=true;
loginform();
}