Commit 0e8aae15 authored by uoure's avatar uoure
Browse files

Delete deleteOldEntriesAdmin.php

parent 8a5b8a3b
<?PHP
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != "z10" || $_SERVER['PHP_AUTH_PW'] != "kruemel") {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo "Passwort oder Benutzername falsch";
exit;
}
$user = 'apache';
$pass = 'e164AzpQx564TpJa';
$db = new PDO('mysql:host=localhost;dbname=reservation', $user, $pass);
$statement = $db -> prepare('DELETE FROM client WHERE date <= ? AND username IS NULL');
$statement->execute(array(date("Y-m-d", strtotime("-4 week"))));
echo $statement->rowCount();
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment