title: JQUERY AJAX call returning PHP page contents
body: <p>So, I'm requesting a file named <code>uuid.php</code>, and when I request it via JQUERY AJAX, it returns the contents of that <code>php</code> file. I've been on multiple other Stack Overflow posts describing the error, and I couldn't get a good answer for my problem.</p>
  <p><strong>JQUERY request:</strong></p>
  <pre><code>$.ajax({
        type: &quot;POST&quot;,
        url: &quot;uuid.php&quot;,
        datatype: &quot;json&quot;,
        data: {&quot;kahoot&quot;:&quot;2020&quot;},
        success: function(data) {
          console.log(data)
          }
      });
  </code></pre>
  <p><strong>uuid.php</strong></p>
  <pre><code>&lt;?php
  $query=$_POST['kahoot']
  $url = 'https://create.kahoot.it/rest/kahoots/?query='.$query;
  $contents = file_get_contents($url);
  echo json_encode(array(data=&gt;$contents));
  ?&gt;
  </code></pre>
  <p>I've tried the <code>PHP</code> code outside of this project, and it works fine. There were no errors, but when I put it into the project it doesn't work. Is this an error with AJAX?</p>