<?php
if ($action== "esegui") {
header('Content-Type: text/plain\n\n');
$pathtomysqldump = "/usr/bin/mysqldump"; // inserisci il persorso per il tuo server
$db = quotemeta($database);
$user = quotemeta($username);
$pass = quotemeta($password);
$comando = "$pathtomysqldump --user=$user --password=$pass $db";
echo system($comando);
exit();
}
?>
<html>
<head>
<title>DUMP</title>
</head>
<body>
<?php if (empty($action)) { ?>
<form name="login" method="post" action="<?php echo $PHP_SELF ?>">
<input type="hidden" name="action" value="esegui" />
database: <input type="text" name="database" />
username: <input type="text" name="username" />
password: <input type="password" name="password" />
<input type="submit" value="Esegui" />
</form>
<?php
} else
echo "Errore";
?>
</body>
</html>