title: How to connect to SQL database from another website?
body: <p>Could I have my php scripts on website A and connect to the MySQL database on website B?</p>
  
  <p>If yes, how it would be done? Thanks in advance</p>
  
  <pre><code>&lt;?php
  
  $server = "";
  $user="";
  $pass="";
  $dbname="";
  
  $con = mysqli_connect($server,$user,$pass,$dbname);
  
  if(!$con){
     die("Error Connecting with DataBase");
  }
  </code></pre>