nada cosí pagina bianca

ti posto sia la pagina del login

e mypage magari puoi aiutarmi meglio


login.php

Codice PHP:
<?php 
//connessione al databese
include 'db_connect.php';

//parte la sessione
session_start ();

//controllo dei dati inviati 
if ((!isset($_POST['username'])) && (!isset($_POST['password']))) 

$result=$_SESSION['user_id'];

// form per il login
echo "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\"> 
Username: <input type=\"text\" name=\"username\" class=\"inputloginform\">
 
Password:  <input type=\"password\" name=\"password\" class=\"inputloginform\">
 
<input type=\"submit\" value=\"Invia\">Fai il login - Oppure registrati [url='registrati.php']Registrati[/url]</form>"

}else{ 

// query tabella utenti
$sql mysql_query("SELECT * FROM users WHERE username='".$_POST['username']."' AND password=('".$_POST['password']."')");
if (
mysql_num_rows($sql)>0)
{
while (
$prova mysql_fetch_array($sql)) {
$num$prova[0];
$_SESSION['username']=$_POST['username']; 
$_SESSION['password']=$_POST['password']; 
$_SESSION['user_id']=$prova[0];

header("Location: mypage.php?id=$prova[0]");
}
}else{
echo 
"Login errato 

 [url='login.php']Ritorna alla pagina login[/url]

[url='registrati.php']Registrati[/url]"
;

}
?>
<html>
<head>
<link href="loginform.css" rel="stylesheet" type="text/css" />
</head>
<body>
</body>
</html>
mypage.php

Codice PHP:
<?php
//connessione al database
include 'db_connect.php';
$result=$_SESSION['user_id'];


//inizio sessione per l'utente che ha effettuato il login
session_start();
if(isset(
$_SESSION['username'])&& isset($_SESSION['password']))
{

echo 
"Benvenuto " $_SESSION['username']; 

}else{
header("Location: login.php");

}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<head>
<title>prova</title>
<link rel="stylesheet" href="stile.css" type="text/css">
<link rel="shortcut" href="http://localhost/favicon.ico">
</head>
<body>
<div id="contenitore">







  <?php
include 'db_connect.php';

$query = @mysql_query

    
'SELECT * 
    FROM users  WHERE id='
.$_SESSION['user_id'].''); 
if (!
$query) { 
  exit(
'

Error performing query: ' 
mysql_error() . '</p>'); 


while (
$row mysql_fetch_array($query)) { 

  
$id $row['id'];
  
$nome $row['nome'];
  
$cognome $row['cognome'];
  
$telefono $row['telefono'];
  
$email $row['email'];
  
$web_site $row['web_site'];
     
$regione $row['regione'];
      
$provincia $row['provincia'];
      
$comune $row['comune'];
      
$cap $row['cap'];
      
$ts $row['ts'];

   
  
// Display the joke with author information 
     
echo "cod cliente:  $id
"
;
    echo 
"Nome:  $nome
"
;
      echo 
"Cognome:  $cognome
"
;
       echo 
"Telefono:  $telefono
"
;
        echo 
"Email:  [email='$email']$email[/email]
"
;
         echo 
"Website:  <a href=http://$web_site>$web_site</a>
"
;
          echo 
"Regione:  $regione
"
;
           echo 
"Provincia:  $provincia
"
;
            echo 
"Comune:  $comune
"
;
             echo 
"Cap:  $cap
"
;
       
        echo 
"Data di registrazione:$ts
"
;
  
}  






?>

<?php echo $_SESSION['user_id'];?>

<?php echo $_SESSION['username'];?>


  [url="logout.php"]Logout [/url]
 
 
<?php if($_SESSION['level']= intval($level); ?> 
   [url="admin.php"]admin [/url]  
<?php endif; ?>