I'm working with a client who gives me some reason not to trust him (who hasn't been in that situation). I'm trying to create a "deadman's switch", where all tables in a database will be deleted on submission of a form (in a secret login protected directory).
What I don't know how to do is drop all tables from a database using PHP. I know how to drop columns and rows, and am sure individual tables can be dropped (but there are a lot of tables), but all tables within a database is beyond me.
Why don't you drop the entire database?
DROP DATABASE database_name
Sample Code
<?php
if(isset($_POST['delete_database'])) {
//Code goes here
}
?>
<form method="post">
<input type="submit" name="delete_database" value="Delete Entire Database" />
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With