this is the code:
<?php
require_once "dbconfig.php";
$sql = mysql_query("SELECT * FROM users11 WHERE username='".addslashes($_POST['username'])."'") or die("username was in correct. MySQL said".mysql_error());
$result = mysql_fetch_array($sql);
if($result['password'] == sha1($_POST['password'])) {
session_start();
header("Cache-control: private");
$_SESSION[”sessioname”] = $_POST[’username’];
header("location: protected.php");
}else{
echo "Incorrect login details please try again.";
}
?>
this is the output:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:\xampp\htdocs\login2\dbconfig.php:4) in E:\xampp\htdocs\login2\login.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\login2\dbconfig.php:4) in E:\xampp\htdocs\login2\login.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\login2\dbconfig.php:4) in E:\xampp\htdocs\login2\login.php on line **10
can’t figure it out what’s the problem… any idea guys?
**