title: How to use PHP to load html file to replace part of a page in an all ajax site?
body: <p>So I am trying to create an entirely ajax site that still enables the usage of the back button and external links. I created a .htaccess file and now I have a get array that I can process in my index.php file. The issue is that I have no idea how to make the repair.html replace the existing section.center html code using PHP. I do it in jQuery everywhere else but obviously this is php. Just give me a push in the right direction, I know I'm close!! You can view the site here: <a href="http://techxpertschico.com" rel="nofollow">http://techxpertschico.com</a></p>
  
  <p><strong>Here is output :</strong></p>
  
  <pre><code>Array ( [parameters] =&gt; repair )
  </code></pre>
  
  <p><strong>This is my php :</strong> I'm not sure what to put in for the comments.</p>
  
  <pre><code>&lt;?php
  if(isset($_GET['parameters']))
  {
      print_r($_GET);
      if($_GET['parameters'] == "repair")
      {
          // load repair.html into section.center
      }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>Here is the jquery :</strong>  I normally load my html files using ajax requests. I use history.js to manage the url hashes.</p>
  
  <pre><code>$('.ajaxAnchor').on('click', function (event){ 
      event.preventDefault(); 
      var url = $(this).attr('href');
      $.get(url, function(data) {
          $('section.center').html(data);
      });
      var shortened = url.substring(0,url.length - 5);
      History.pushState({state:1}, shortened, shortened);
  });
  </code></pre>
  
  <p><strong>Example section.center from the home page load:</strong></p>
  
  <pre><code>&lt;section class="center"&gt;
              &lt;p&gt;
                  Welcome to TechXperts! We offer training and repair for all of your tech devices, but our primary goal is to listen! We know that technology is frustrating so we give you the chance to let us know what your problem is. We will offer the necessary training, or repair to help you have fun using your devices, the way it should be! We feel that is our responsibility to the community as the local TechXperts!
              &lt;/p&gt;
              &lt;a href="https://techxpertschico.youcanbook.me/" class="appointmentButton"&gt;Book Appointment Now&lt;/a&gt;
              &lt;a href="quote.html" class="appointmentButton"&gt;Get a Quote&lt;/a&gt; 
              &lt;img src="images/random/FrustratedFlyers.png"&gt;
              &lt;h3 style="display: inline; position: relative; bottom: 150px;"&gt;Friendly staff always available to answer questions!&lt;/h3&gt;
              &lt;div style="display: inline; position: relative; left: 310px; bottom: 100px;"&gt;
                  &lt;img src="/images/random/Apple.png" width="100px"&gt;
                  &lt;img src="/images/random/Windows8-1.png" height="80px"&gt;
                  &lt;img src="/images/random/Andoird.png" width="100px"&gt;
                  &lt;img src="/images/random/check.png" width="100px"&gt;
              &lt;/div&gt;
          &lt;/section&gt;
  </code></pre>