title: mysql_close() expects parameter 1 to be resource, null given
body: <p>The line causing the error is this one...</p>
  
  <pre><code>mysql_close($con);
  </code></pre>
  
  <p>Here is the entirety of the code...</p>
  
  <pre><code>$con=mysqli_connect("localhost","root","pass","db_name");
  // Check connection
  if (mysqli_connect_errno()) {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  $result = mysqli_query($con,"SELECT * FROM medicos");
  
  
      while($row = mysqli_fetch_array($result)) {
      echo '.....';
      }
  
  
  
      mysql_close($con);
  </code></pre>