title: Cannot include PHP file to my HTML
body: <p>I'm trying to access my function.php file so I'll be able to use the functions inside it. But I can't connect it. I tried running the PHP alone and there's no problem encountered. But when I include it on my HTML, nothings happening.</p>
  
  <p><strong>HTML CODE:</strong></p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
  &lt;?php 
  include("functions/function.php");
  ?&gt;
  &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Online Shop&lt;/title&gt;
      &lt;link rel='stylesheet' href='../CSS/style.css' media="all"/&gt;
      &lt;/head&gt;
  &lt;body&gt;  
              &lt;!--Main Wrapper starts here!--&gt;
      &lt;div class="main_wrapper"&gt; 
  
              &lt;!--Header Wrapper starts here!--&gt;
          &lt;div class="header_wrapper" &gt;
          &lt;img id="logo" src="../Pictures/logo.png"/&gt;
          &lt;img id="banner" src="../Pictures/green-banner.jpg"/&gt;
          &lt;/div&gt;
              &lt;!--Header ends here!--&gt;
  
              &lt;!--Menu Bar starts here!--&gt;
          &lt;div class="menubar"&gt;
          &lt;ul id="menu"&gt;
              &lt;li&gt;&lt;a href="#"&gt; Home &lt;/a&gt;&lt;/li&gt; 
              &lt;li&gt;&lt;a href="#"&gt; All Products &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt; My Account &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt; Sign Up &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt; Shopping Cart &lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt; Contact Us  &lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;div id="form"&gt;
              &lt;form method="get" action="results.php" enctype="multipart/form-data"&gt;
                  &lt;input type="text" name="user_query"  placeholder="Search Product"/&gt;
                  &lt;input type="submit" name="search" value="search"/&gt;
              &lt;/form&gt; 
          &lt;/div&gt;
          &lt;/div&gt;&lt;!--Menubar ends here!--&gt;
  
              &lt;!--Content Wrapper here!--&gt;
          &lt;div class="content_wrapper"&gt;
              &lt;div id="sidebar"&gt; 
                  &lt;div id="sidebar_title"&gt; Categories&lt;/div&gt;
                  &lt;ul id="cats"&gt;
                      &lt;?php getCats(); ?&gt;             
                  &lt;/ul&gt;   
              &lt;/div&gt;
              &lt;div id="content_area"&gt;THis is asa content&lt;/div&gt;
          &lt;/div&gt;&lt;!--Content Wrapper ends here!--&gt;
          &lt;div id="footer"&gt;  &lt;/div&gt;
      &lt;/div&gt;&lt;!--Wrapper--&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>PHP CODE:</strong></p>
  
  <pre><code>&lt;?php
  
  $con = mysqli_connect("localhost","root","","ecommerce");
  //Getting Categories
  function getCats(){
  
  global $con;
  $get_cats = "Select * from categories";
  
  $run_cat = mysqli_query($con, $get_cats);
  
  while ($row_cats=mysqli_fetch_array($run_cat)){
  
      $cat_id = $row_cats['cat_id'];
      $cat_title = $row_cats['cat_title'];
  echo"&lt;li&gt;&lt;a href='#'&gt;$cat_title&lt;/a&gt;&lt;/li&gt;";
  }
  } //getCats() ENDS HERE
  ?&gt;
  </code></pre>
  
  <p><strong>additional information:</strong></p>
  
  <p>My HTML Path: C:/xampp/htdocs/ProjectWebDev/HTML/index.html</p>
  
  <p>My PHP Path:  C:/xampp/htdocs/ProjectWebDev/functions/function.php</p>