6 // This script is potentially dangerous.
7 // Remove or comment the next line (die(".... ) to enable this script.
8 // Do NOT FORGET to either remove this script or disable it after you have used it.
10 die("Please read the first lines of this script for instructions on how to enable it");
13 // Do not change anything below this line.
17 // Just a handy script to completely wipe out the contents of a
18 // database.. Use with caution :)
24 <FORM ACTION
="<?php echo $PHP_SELF?>" METHOD
="post" >
28 <td
><INPUT TYPE
="text" name
="dbhost" value
="localhost"></td
>
31 <td
><INPUT TYPE
="text" name
="dbname" value
="phpBB"></td
>
34 <td
><INPUT TYPE
="text" name
="dbuser" value
="root"></td
>
37 <td
><INPUT TYPE
="password" name
="dbpass"></td
>
39 <INPUT TYPE
="submit" name
="submit" value
="Submit">
45 mysql_connect($dbhost, $dbuser, $dbpass) ||
die(mysql_error());
46 mysql_select_db($dbname);
48 $result = mysql_query("SHOW TABLES");
49 while($row = mysql_fetch_row($result)){
51 print "Going to drop $table...";
52 mysql_query("DROP TABLE $table") ||
die();