title: Javascript Passing variable not working in Ajax
body: <p>I am having a problem passing a variable to my ajax where:</p>
  
  <p>This will work: url: 'testing.php?id=1',</p>
  
  <p>and this will not work: url: 'testing.php?id=theid',</p>
  
  <p>Here is the full code which works:</p>
  
  <pre><code>function myfunc(theid) {
      $.ajax({
          url: 'testing.php?user_id=1',
          success: function() {
              alert('this worked' + venueid);
          }
      });
  }
  </code></pre>
  
  <p>And this code does not pass the variable value:</p>
  
  <pre><code>function myfunc(theid) {
      $.ajax({
          url: 'testing.php?user_id=theid',
          success: function() {
              alert('this worked' + venueid);
          }
      });
  }
  </code></pre>
  
  <p>Is this a syntax issue? What I'm I doing wrong here?</p>