hi all - i’m new to php and also new to this forum.
i have a form that reads in 2 inputs from the user: database name and directory.
DB Name:Directory:
what i’m trying to do is, based on the user inputs, would for the dbname, execute a mysqldump to backup the database. and for directory, execute a tar -czvf $dir.tar.gz $dir.
i have the following for the tar part:
$directory=$_POST[“dir”];
$output = shell_exec('tar -czvf {$directory}.tar.gz <?php echo $directory; ?>');
however, it’s not executing. please help. thanks