Salve,

Mi servirebbe un altro grande aiuto !

Premetto che ho cercato in questo forum, ma non mi va' bene in nessun modo

Praticamente vorrei che per ogni utente che effettua il login venga reindirizzato ognuno su una pagina diversa.

ESEMPIO:

UTENTE 1 --> Effettua il login e viene reindirizzato a --> PAGINA_UNO.PHP
UTENTE 2 --> Effettua il login e viene reindirizzato a --> PAGINA_DUE.PHP
UTENTE 3 --> e cosi via...

Il pezzo di codice che controlla i dati che siano corretti è questo:


Codice PHP:
// Controllo inserimento dati
    
if (trim($user) == "" OR trim($pass) == "")
     
Errore("javascript:history.go(-1)""Errore""I campi devono essere riempiti" ,".");

    else 
     {
          
$user addslashes(stripslashes($user));
         
$pass addslashes(stripslashes($pass));
         
$user str_replace("<""&lt;"$user);
        
$pass str_replace(">""&gt;"$pass);
        
        
// Connessione al database
        
Db_connect(); 

e poi cè il "recupero dati nel database"

Codice PHP:
// Recupero dati dal database
             
if (!get_magic_quotes_gpc())
             {
                 
$useraddslashes($_POST['user']);
                 
$passaddslashes($_POST['pass']);
             }
             
             else
             {
                 
$user$_POST['user'];
                 
$pass$_POST['pass'];
             }
             
$crypt_pass md5($pass);
             
$query "SELECT * from ".$tbl_prefix."user WHERE username = '$user' AND password = '$crypt_pass'";
             
$risultato mysql_query($query);
             
$num_righe mysql_num_rows($risultato);
             if(
$num_righe)
            {
                
//  L'utente è stato riconosciuto

              
$row mysql_fetch_array($risultato);
              if (
$row['actived'] != "1")
         
Errore("javascript:history.go(-1)""Errore""L'account non risulta ancora attivato tramite la conferma email!" ,".");
             
                
session_cache_limiter("private_no_expire");
                
                
$_SESSION['login'] = "yes";
                
$_SESSION['auth'] = $row[auth];
                
$_SESSION['username'] = $row[username];
                
$_SESSION['nome'] = $row[nome];
                
$_SESSION['cognome'] = $row[cognome];
                
$_SESSION['mail'] = $row[mail];

                

            } 
------

Come posso fare ? Grazie mille !