title: jQuery AJAX pass url as string
body: <p>I have a ajax function that is passing a string of variables to my script but I have one variable that needs to contain a full url with parameters.</p>
  
  <p>What happens is that var1 and var2 become $_POST variables but I need to save the whole url variable as a string.</p>
  
  <pre><code>var url = "http://domain.com/index.php?var1=blah&amp;var2=blah";
  
  var dataArray = "rooftop_id=" +rooftop_id+ "&amp;url=" +url;
  
          $.ajax({
              type: "POST",
              url: "/scripts/error_check.php",
              data: dataArray,
              dataType: 'json'
          }); 
  </code></pre>
  
  <p>I would like my $_POST variable to look like this:</p>
  
  <pre><code>$_POST['rooftop_id'] would be '1234'
  $_POST['url'] would be 'http://domain.com/index.php?var1=blah&amp;var2=blah'
  </code></pre>
  
  <p>Thanks in advance!</p>