Skip to content

Instantly share code, notes, and snippets.

@DavidMellul
Last active March 1, 2018 10:12
Show Gist options
  • Save DavidMellul/461892097dd1a9f951f1618f3d967691 to your computer and use it in GitHub Desktop.
Save DavidMellul/461892097dd1a9f951f1618f3d967691 to your computer and use it in GitHub Desktop.
<?php
// Requested URL => http://VerySafePlace.io/deleteEverything
$token = $_GET['token'];
if(empty($token))
showErrorMessage();
else {
// This will check that the token matches the logged user's one
if(token_exists_in_database($token))
deleteEverything();
else
showErrorMessage();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment