title: Jquery and PHP GET function
body: <p>How can I make jquery run that <code>$_GET</code>. I'm trying to remove "Refreshing a page" and that is why I'm trying to use jQuery.</p>
  
  <pre><code>if (isset($_GET['add'])) {
      global $db;
      $quantity = $db-&gt;query('SELECT id, quantity FROM data WHERE id = '.$_GET['add']);
      while ($r = $quantity-&gt;fetch()) {
          if ($r['quantity'] != $_SESSION['data_'.(int)$_GET['add']]) {
              $_SESSION['data_'.(int)$_GET['add']]+= '1';
          }
      }
  </code></pre>
  
  
  
  <pre><code>&lt;script&gt;
  $( ".wasd" ).click(function( event ) {
      event.preventDefault();
      $( "&lt;div&gt;" )
          .append( "$_GET add function" )
          .appendTo( "#log" );
  });
  &lt;/script&gt;
  </code></pre>