View Single Post
  #1   (View Single Post)  
Old 20th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Default Quick question about PHP script

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
__________________
The power of plain text? It can control an entire OS
Reply With Quote