hmm...non ho capito tutto!!
dovrei aggiungerci questo al codice del login?
Codice PHP:
<?php
session_start();
dbconnect();
if (!isset($verified_user)) $verified_user='';
if ($action=='login') {
$result=mysql_query("SELECT id,Nick,Pass,Bannato,Data_ FROM login WHERE Nick='".$nick."' AND Pass='".$psw."'");
if (mysql_num_rows($result)>0) list($verified_user)=mysql_fetch_row($result);
else $verified_user='';
}
session_register("verified_user");
if($row['Bannato']=0)
{ list($verified_user)=mysql_fetch_row($result);}
else
{ $verified_user=''; }
Codice PHP:
?>
<?php
setcookie("user_id", $nick, 0, $cookie_path, $cookie_host);?>
<?php
if ($verified_user != '') {
include('mappa.php');
} else {
if ($action == "login" && $verified_user == '') {
include('errore_login.php');
}
?>
<?php
}
function dbconnect() {
mysql_connect("localhost", "a", "p");
@mysql_select_db("antichieroi_com") or die ("Unable to select database");
}
?>