title: Call .PHP file from .HTML file
body: <p>I am using <code>HTML</code> as my base and my file is called <code>index.php</code> - I have a secondary <code>.php</code> page called <code>PHPSyntax.php</code> that holds <code>php</code> functions in it.  How from within <code>index.php</code> can I call a function from <code>phpsyntax.php</code> and return the result to <code>index.html</code></p>
  
  <p>File structure is like this:
  <strong>Index.php</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
      &lt;h4&gt;PHP Testing&lt;/h4&gt;
      &lt;form&gt; 
          &lt;select&gt; 
              &lt;option value="null" selected="selected"&gt;&lt;/option&gt;
              //here is where I want to call and return the values from my php
      &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And my <strong>PHPSyntax.php</strong><br>reads like this</p>
  
  <pre><code>&lt;?php
    $servername = "localhost";
    $username = "username";
    $password = "password";
    $dbname = "test";
    $conn = new mysqli($servername, $username, $password, $dbname);
    if ($conn-&gt;connect_error) { die("Connection failed: " . $conn-&gt;connect_error); }
    $sql = "Select name As 'employeename' from employees";
    $result = $conn-&gt;query($sql);
    if ($result-&gt;num_rows &gt; 0) 
    {
    while($row = $result-&gt;fetch_assoc()) { echo "&lt;option value=".$row['employeename']."&gt;".$row['employeename']."&lt;/option&gt;&lt;br&gt;"; }
    } 
    else echo "&lt;option value='null'&gt;default&lt;/option&gt;";
    $conn-&gt;close();
  ?&gt;  
  </code></pre>