Originariamente inviato da goikiu
qualsiasi testo o codice html mandato all'utente prima che gli mandi l'header.
Il codice è questo:

<?php session_start();?>
<style>@import url(stile.css);</style>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td><center>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<?php
$mysqli = new mysqli('localhost', 'root', 'lilulo78', 'nikkia');
$mysqli->autocommit(true);

//mostra la parte dell'utente una volta che si è loggato
function mostraManager(){
?>
<div id="sopra">
<div id="distSx"></div>
<div id="distSup"></div>
<div>
<form action="insd.php" method="POST">
<div>Benvenuto <?php echo $_SESSION['user'];?>!</div>
</form>
</div>
</div>
<div id="separatore"></div>
<div>
<div>AGGIUNGI UN EVENTO</div>
</div>
<?php
}
//mostra il messaggio negativo per l'utente che voleva entrare con dati sbagliati
function mostraNega(){
?>

<?php
}

//processo per vedere se l'utente è effettivamente registrato
$result = $mysqli->query("SELECT * FROM utenti", MYSQLI_USE_RESULT);
while($row = $result->fetch_assoc())
{
if($row['user']==$_POST['user'] && $row['psw']==$_POST['psw']){
$risultato=true;
$_SESSION['user']=$_POST['user'];
$_SESSION['psw']=$_POST['psw'];
$_SESSION['idCreatore']=$row['id'];
break;
}else{
$risultato=false;
}
}
$result->close();
if($risultato==true){
header('Locationrova.php');
mostraManager();
}else{
mostraNega();
}
$mysqli->close();
?>
</td>
</tr>
</table>
</center></td>
</tr>

Quale sarebbe l'output che non va??!?