2 hours ago, I absolutely have no idea how to program in PHP. I took a PHP crash course, because I need to back up my website database. The hosting provider doesnt provide any front end application, so I create a PHP script:
Code:
$sqlFile = $dbname . date(".d-m") . '.sql';
$zipFile = $sqlFile . '.zip';
$dumpCommand = "mysqldump -h$host -u$dbuser -p$dbpword $dbname > $sqlFile";
system($dumpCommand);
system("zip $zipFile $sqlFile");
I suspect there is something wrong with the last command (the zip one). Somehow it doesnt want to execute.
Pls shed some light. I have spent more than 1 hour, but havent worked out how to fix it