title: Client Side Download of MySQL database
body: <p>I use this codes to download MySQL Database on Server Side it works fine but I don't know how to download Database on Client Side, please help.</p>
  
  <pre><code>        include'connect.php';
      if(isset($_POST['download'])){
  
          $time = time();
          $current_date_time = date('d-m-Y@H-i-s', strtotime('+3 hours'));
          $backupFile = 'D://xampp//htdocs//development//ShahrajeTraders//backup//'.$database.'~'.$current_date_time.'.sql';
          $command = "D://xampp//mysql//bin//mysqldump.exe -h $host_name -u $user_name -p$user_pass $database &gt; $backupFile";
          system($command);
  
          if($command){
              echo'
              &lt;script&gt;
                  $(document).ready(function(){
                      alert("Download Completed.");   
                  }); 
              &lt;/script&gt;
              ';          
          }else{
              echo'               
              &lt;script&gt;
                  $(document).ready(function(){
                      alert("Error During Downloading."); 
                  }); 
              &lt;/script&gt;
              ';
          }
      } 
  </code></pre>