query("SELECT `link` FROM `Games` WHERE `Gid` = '".$_GET['sid']."' LIMIT 1") or die (mysql_error()); $software = $db->fetch($sqlsoft); $db->query("UPDATE `Games` SET `Downloads` = Downloads+1 WHERE `Gid` = '".$_GET['sid']."' LIMIT 1") or die (mysql_error()); //$db->query("UPDATE `Gebruikers` SET `Downloads` = Downloads+1 WHERE `gid` = '".$_SESSION['stats']['member_id']."' LIMIT 1") or die (mysql_error()); header("Location: ".$software['link']); }else{ $sqlsoft = $db->query("SELECT `link` FROM `Downloads` WHERE `sid` = '".$_GET['sid']."' LIMIT 1") or die (mysql_error()); $software = $db->fetch($sqlsoft); $db->query("UPDATE `Downloads` SET `Downloads` = Downloads+1 WHERE `sid` = '".$_GET['sid']."' LIMIT 1") or die (mysql_error()); //$db->query("UPDATE `Gebruikers` SET `Downloads` = Downloads+1 WHERE `gid` = '".$_SESSION['stats']['member_id']."' LIMIT 1") or die (mysql_error()); header("Location: ".$software['link']); } $db->close(); ?>