ciao
come si fa a fare il redirect in php?
ho trovato
"header( "Location: url.php" ); "

ma il seguente codice mi da errore

Warning: Cannot modify header information - headers already sent by (output started at /home/igrambon/public_html/controlla.php:9) in /home/igrambon/public_html/controlla.php on line 19

codice:
<?php
$email=$_POST['email'];
$pw=$_POST['pw'];
include 'collegamento_db.php';
$query=mysql_query("SELECT pw FROM utenti WHERE email='".$email."'");
$num=mysql_numrows($query);
mysql_close();
if ($num>0){
   header( "Location: http://xxx/1.php" ); 
}else{
   header( "Location: http://xxx/index.html" ); 
}

?>