0) { $linkdata = mysql_fetch_row(mysql_query("SELECT ad_id,hits FROM ad_sidereg WHERE link_id='$link_id'")); $hits = $linkdata[1] + 1; mysql_query("UPDATE ad_sidereg SET hits='$hits' WHERE link_id='$link_id'"); $destinasjon=mysql_fetch_row(mysql_query("SELECT destinasjon FROM ad_arts WHERE ad_id='$linkdata[0]'")); if (substr($destinasjon[0], 0, 4) == "http") { header("Location: $destinasjon[0]"); } else { header("Location: http://$destinasjon[0]"); } exit; } else { echo "Det oppstod en feil ved videresending til hjemmeside."; exit; } ?>