Ora quando cerco di fare il login mi dice:


Warning: Cannot modify header information - headers already sent by (output started at /home/colde/public_html/config.inc.php:47) in /home/colde/public_html/autenticazione.php on line 19


Il codice:

ini_set ("session.cookie_lifetime", "3600");
ini_set ("arg_separator.output", "&");
session_start();
include 'config.inc.php';

$conn = mysql_connect($connessione, $userselect, $pwselect) or die("Errore nella connessione a MySql: " . mysql_error());

mysql_select_db($db, $conn) or die("Errore nella selezione del db: " . mysql_error());
$usn = $_POST['user'];
$paw = $_POST['pass'];
unset($_POST);

$query = "SELECT * FROM autenticazione WHERE (user='$usn' and pass='$paw')";
$ris = mysql_query($query, $conn) or die("Errore nella query: " . mysql_error());

while ($riga = mysql_fetch_array($ris)) {
$_SESSION['accesso']=true;
header('location: pannello.php');
exit();
}
if (!isset($_SESSION['accesso'])) {
echo "User e Pass errate.";
} else {
header('location: pannello.php');
}
mysql_close($conn);