I have backup successfully but now i need to restore that data in localhost j my backup drive is C:\wamp\www\my Pawning Project\backup_restore this is my restore code.
<?php
include '../Connection/connect.php';
$restore_data = $_GET['restore_data'];//file time
$base="http://localhost/my%20Pawning%20Project/backup_restore/";
$query = "select * from backups where time='$restore_data'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
$file_path =$row['file_name'];
}
$sql=file_get_contents($base.$file_path);
mysql_query($sql);
if(mysql_query($sql))
{
/*Success*/
echo "Successfully restored";
}
else
{
/*Fail*/
echo "Error: Fail to Restore";
}
?>