qui posto login.php
Codice PHP:
<? 
include 'funzioni.inc.php' 
include 
'config.inc.php' 
error_reporting E_WARNING | ~ E_NOTICE ) ; 
check$_SERVER['REMOTE_ADDR']); 
intestazione(); 
?> 
 
<? 



$ris 
checkIP($REMOTE_ADDR); 
if (
$ris) { 
    echo 
"&mess= Ciao $ris, eri già loggato. Vai alla home page."
} else { 
    if (
$id=controllo($_POST['user'],$_POST['passw'])) { 
        
$conn connetti(); 
        
$dataEntr = @time()+60*10// 60 sec * 10 minuti 
        
$query mysql_query("INSERT INTO `utenti_online` (`id_utente`,`ip`,`tempo`) VALUES ('$id','$REMOTE_ADDR','$dataEntr')",$conn) or print mysql_error(); 
        
disconnetti($conn); 
        echo 
"&mess= Utente connesso. Vai alla home page."
        } else { 
            echo 
"&mess=  Attenzione il nick o la password inseriti non sono esatti!"
      } 


finepagina(); 

?>
database
codice:
CREATE TABLE utenti_online (
  id int(4) NOT NULL default '0',
  id_utente varchar(4) NOT NULL default '',
  ip varchar(11) NOT NULL default '',
  tempo int(11) NOT NULL default '0',
  UNIQUE KEY id (id),
  UNIQUE KEY id_utente (id_utente)
) TYPE=MyISAM;


CREATE TABLE utenti (
id_utente int(11) NOT NULL auto_increment,
nick varchar(20) NOT NULL default '',
pass varchar(20) NOT NULL default '',
email varchar(50) NOT NULL default '',
UNIQUE KEY id (id_utente)
) TYPE=MyISAM;
se serve posto anche gli altri due files