alert('Deze url is niet geldig !!'); location.href='javascript:javascript:history.go(-1)';"); exit; } ob_start(); include("/var/www/etherpiraten.com/web/cgi-bin/config_out.php"); $query = "SELECT foto, mime_type FROM agenda WHERE id = '".$mysqli->real_escape_string($_GET['id'])."'"; if($result = $mysqli->query($query)){ $row = $result->fetch_assoc(); } if (!$row['foto']) { die("Foto bestaat niet.."); } header("Content-Type: " . $row['mime_type']); echo $row['foto']; ?>