title: jQuery Ajax not sending Post data to PHP file
body: <p>I'm trying to send variables from my JavaScript to a PHP file using AJAX but it's not working. I've looked through all the similar asked questions (there are a bunch) but have yet to find a solution. </p>
  
  <p><strong>This is my first php file (one with the form, sends data to JavaScript):</strong></p>
  
  <pre><code>&lt;option value="imageOne" data-cuteform-image='assets/SketchThumbnails/imageOne.png&gt;&lt;/option&gt;
  &lt;input id="inputURLID" type="text" name="inputURL"&gt;
  
  &lt;button type="submit" onclick="handleInputs(document.getElementById('sketch').value, document.getElementById('inputURLID').value); return false;"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p><strong>JavaScript (where AJAX call is)</strong>:</p>
  
  <pre><code>var content = {
      'sketch': pickedSketch,
      'songUrl': enteredURL
  };
  $.ajax({
      type: "POST",
      url: "loadSketch.php",
      data: content,
      success: function (data, text) {
          // alert("success");
          // console.log(data);
          // console.log(text);
  
          window.location.href = "loadSketch.php";
  
      },
      error: function (request, status, error) {
          alert(request.responseText);
      }
  });
  </code></pre>
  
  <p><strong>PHP (loadSketch.php):</strong></p>
  
  <pre><code>if(isset($_POST['songUrl']))
  {
      $temp = $_POST['songUrl'];
      echo $temp;
      echo "received AJAX data";
  } else {
      echo "nothing in post variable";
  }
  </code></pre>
  
  <p>When I get redirected to loadSketch.php (from the successful ajax call), "nothing in post variable" gets echoed out. Any ideas what I'm doing wrong?</p>
  
  <p>Any insight is much appreciated! :)</p>