mysql dump

hi all
[php]
$dbhost = ‘localhost’;
$dbuser = ‘root’;
$dbpass = ‘’;
$dbname = ‘test_01’;
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (‘Error connecting to mysql’);
mysql_select_db($dbname);

$backupFile = $dbname . date(“Y-m-d-H-i-s”) . ‘.sql’;
$command = “C:\xampp\mysql\bin\mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname > D:$backupFile”;
system($command);

mysql_close($conn);[/php]

can smo help me where is the problem? i get no backup file even there`s no error.

thank u

There should not be a space after -p

i tried but it didnt work again.

Try using exec() instead of system()?

Sponsor our Newsletter | Privacy Policy | Terms of Service