Be VERY careful with this, there is no turning back once you've done it:
This will delete ALL of the records in your selected database:
<?php
if($_GET['action'] == "delete") {
// Connect to your database
$db = mysql_connect($db, $sql);
// Select your database
mysql_select_db("databasename", $db);
// Get all the tables
$sql = "SHOW TABLES";
$table_result = mysql_query($sql, $db) or die(mysql_error());
while($table = mysql_fetch_row($table_result)) {
// Loop through all of the tables, deleting the records from each one
$sql = "DELETE FROM ".$table[0];
mysql_query($sql, $db) or die(mysql_error());
}
}
// This is the link
echo "<a href=\"".$_SERVER['PHP_SELF']."?action=delete\">Delete ALL Records! WARNING - NOT ADVISED</a>";
?>