$link = mysql_connect("panoramix.ift.uni.wroc.pl", "maq", "haslo") or die ("Connection with database problem..."); mysql_select_db ("maq_strona") or die ("Cannot acces to main database."); $godzina = date("H", time()); $minuta = date("i", time()); $dzien = date("d", time()); $miesiac = date("m", time()); $rok = date("Y", time()); $data = $godzina.":".$minuta." , ".$dzien."-".$miesiac."-".$rok; $IP = $REMOTE_ADDR; $HOST = GetHostByAddr($IP); $BROWSER=$HTTP_USER_AGENT; if($HTTP_REFERER != "http://panoramix.ift.uni.wroc.pl/~maq/") { if($IP != "130.236.236.31") { $sql_query = "insert into visitor values ('','$IP','$HOST','$HTTP_REFERER','$data')";// FROM users WHERE user_id='$user_id'"; $result = mysql_query ($sql_query) or die ("Query Incorrect - no user deleted, $user_id='$user_id'"); } } mysql_close($link); ?>