Mysql restore php commands
Posted: Tue Jun 14, 2005 10:26 am
Okay i think i have a script thats supposed to run a mysql restore command in shell but it doesn't work i wanted it to be able to pick the file run gzip on it then run the mysql restore command in shell but it wont work
Heres my script
<HTML>
<TITLE>Mysql Restore</TITLE>
<CENTER><B><FONT SIZE=32>Mysql Restore</FONT></B></CENTER>
<CENTER><FORM METHOD=post ACTION="">
<INPUT type="file" name="filename">
</FORM></CENTER>
<?php
$backupFile = filename
$command = "mysql -user -password database | gzip > $backupFile";
system($command);
?>
</HTML>
Thats the entire script if some one could possibly tell me what im doning wrong, or maybe fix the script for me i would be ever so greatful
Thanks!
Heres my script
<HTML>
<TITLE>Mysql Restore</TITLE>
<CENTER><B><FONT SIZE=32>Mysql Restore</FONT></B></CENTER>
<CENTER><FORM METHOD=post ACTION="">
<INPUT type="file" name="filename">
</FORM></CENTER>
<?php
$backupFile = filename
$command = "mysql -user -password database | gzip > $backupFile";
system($command);
?>
</HTML>
Thats the entire script if some one could possibly tell me what im doning wrong, or maybe fix the script for me i would be ever so greatful
Thanks!