t-r.de/content/php/unsubscribe.php

18 lines
456 B
PHP

<?php
function RemoveSubscriberfromDB($subscriberAddress) {
error_log("removing subscriber " . $subscriberAddress . " from DB ...");
}
require(dirname(__FILE__) . "/settings.php");
$email = isset($_GET['e']) ? SanitizeInputs($_GET['e']) : NULL;
if (isset($email)) {
$r = RemoveSubscriberfromDB($email);
if ($r) {
header('Location: /newsletter/unsubscribed.html');
} else {
header('Location: /newsletter/unsubscribe-error.html');
}
}
?>