title: jQuery AJAX submitting not working
body: <p>I'm having trouble with a jquery ajax submit form. Here's the jquery code:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/
  libs/jquery/1.3.0/jquery.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" &gt;
      $(function() {
          $(".submit").click(function() {
              var number = $("#number").val();
              var machine_id = $("#machine_id").val();
              var dataString = 'number='+ number + '&amp;machine_id=' + machine_id;
              $.ajax({
                  type: "POST",
                  url: "http://www.onmsgmedia.com/hurryitUP/updatetextdatabase.php",
                  data: dataString,
              });
              return false;
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and here is the form code:</p>
  
  <pre><code>&lt;form name="form" method="post" action=""&gt;
      &lt;input type="hidden" id="machine_id" name="machine_id" value="5"&gt;
      &lt;input type="text" id="number" name="number"&gt;&lt;/input&gt;
      &lt;input class="btn btn-small btn-success" type="submit" class="submit" id="submit" name="submit" value="submit"&gt;Submit&lt;/input&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And the code of updatetextdatabase.php:</p>
  
  <pre><code>    &lt;?php
  date_default_timezone_set('America/New_York');//set time zone
  $con=mysqli_connect('saslaundry.db.10410357.hostedresource.com', 'saslaundry', 'password', 'saslaundry');//establish connection
  // Check connection
  if (mysqli_connect_errno())//ping database to check connection
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();//error message
    }
      mysqli_query($con,"INSERT INTO textrequests VALUES('$_GET[number]', '$_GET[machine_id]') ");
      return;
  ?&gt;
  </code></pre>
  
  <p>But not only is it not submitting the form, the page also reloads, which is sort of what I was trying to avoid by using AJAX. I feel like the problem is that the function is not being called by the submit button, but I can't figure out why.</p>
  
  <p>Thanks!</p>