db_com_open()) echo "connection failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_select_db($dbname)) echo "selection of database failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_query($sql)) echo "query failed
".$db->db_com_get_last_error()."
"; //Auswahl aufzurufenden Seite - vorhergehender Eintrag $db = new db_com; $sql="SELECT pos_vor from webring_inhalt where pos=$id"; if(!$db->db_com_open()) echo "connection failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_select_db($dbname)) echo "selection of database failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_query($sql)) echo "query failed
".$db->db_com_get_last_error()."
"; while($result = $db->db_com_get_next_result()) { $pos_vor=$result[0]; } $sql="SELECT url from webring_inhalt where pos=$pos_vor"; $db = new db_com; if(!$db->db_com_open()) echo "connection failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_select_db($dbname)) echo "selection of database failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_query($sql)) echo "query failed
".$db->db_com_get_last_error()."
"; while($result = $db->db_com_get_next_result()) { $link=$result[0]; } // Log für aufzurufende Seite $db = new db_com; $woher=2; $sql ="INSERT into webring (ip,aufruf,datum,seitenname,browser) values ('".$ip."',".$pos_vor.",'".$datum."',$woher,'".$wie."')"; $db = new db_com; if(!$db->db_com_open()) echo "connection failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_select_db($dbname)) echo "selection of database failed
".$db->db_com_get_last_error()."
"; if(!$db->db_com_query($sql)) echo "query failed
".$db->db_com_get_last_error()."
"; echo $link; header("Location:$link"); ?>