I was getting what appeared to be the results of a mysqldump --help. That is fixed now, but of course I want more out of it. I'm trying to tar the string into a file. And I'm getting a permission denied. Here is a snipet of the added code:
$create = "touch /dir/backup.txt";
$fp = fopen("/dir/backup.txt","w");
$file_stuff = "fwrite($fp, $sql_dump_result)";
$sql_dump_result1 = shell_exec($create);
$sql_dump_result2 = shell_exec($file_stuff);