Originariamente inviato da apsoft
io farei più semplicemente così, una volta controllato il dbase avii la sessione e assegni letteralmente il nome utente ad una variabile di sessione che da quel momento conterrà ciò che ti interressa.

  • session_start();
    session_register ('nome_utente');
    $nome_utente=$usernameinseritodallutente;


io utilizzo $PHPSESSID per verificare se la sessione è ok

ciao, APSoft
dalla pagina man di session_register

Caution

If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled.
quindi meglio :

codice:
$_SESSION['nome_utente'] = $variabile;
ciao