title: Warning: Missing argument 1 for getConnection()
body: <pre><code>function getConnection($con) 
       {
          $con = mysqli_connect('localhost', 'root', '','test') or die(mysqli_connect_error());
           // Check connection
           if (mysqli_connect_errno())
             {
               echo "Failed to connect to MySQL: " . mysqli_connect_error();
             }
             $query = "ID FROM Student";
             $result = mysqli_query($con, $query);
  
       }
  </code></pre>
  
  <p>Is the error caused due to $con used in the function ? Any help please.</p>