hi my code is not working when to running .. it create to mysql files but ..not create to my table and it created to table 0 byte ... why ?

this is backup code ::


<?php
$backup=$_POST['text'];
$host = 'localhost';
$user = 'root';
$pass = '';
$backupDir = 'c:\\';
$backupFileName = $backup;
$back = $backupDir.$backupFileName;
system(sprintf("mysqldump pet -h %s -u %s -p%s > %s",$host,$user,$pass,$back));
echo "<center><h2><font color='red'>Record Saved.</font></h2></center>";
?>

and this is restore code :: 


<?php

$restore=$_POST['text'];
$host = 'localhost';
$user = 'root';
$pass = '';
$backupDir = 'c:\\';
$backupFileName = $restore;
$back = $backupDir.$backupFileName;
system(sprintf("mysqlimport -u ".$user." -p ".$pass." petdb ".$back.""));
echo "<center><h2><font color='red'>Record Saved.</font></h2></center>";
?>
</body>

Recommended Answers

All 2 Replies

<URL SNIPPED>look here

thank you for helping

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.