When I use jQuery AJAX to submit a form on my page, it takes two clicks to actually submit to my database
===

I've been trying different options for about two days now and nothing seems to work. What makes this slightly more complicated is that I have multiple forms on the page that all need to be tied to this same submit function. They all have different IDs.

The following is a simplified version of my jQuery:

    $(document).ready(function() {
    $('form').bind( 'submit', function(form) {
		alert("Binding!");
		$.ajax({
		  type: "POST",  
		  url: "inc/process.php",
		  data: $(this).serialize(),
		  success: function() {
			alert("Your updates have successfully been added.");
		  }
		});
        return false;
    });
    });
The binding alert fires as does the success on the first try, but no changes are made to the database until I submit a second time.

I have also tried the following jQuery without success (same results as above):

    $(document).ready(function() {
    $('form').submit( function(form) {
        $.post("inc/process.php",$(this).serialize(),function(data){
            alert("Your updates have successfully been added."); // alert on success
        });
        return false;
    });
    });

And relevant sections of inc/process.php:

    $query =	'UPDATE		pop_contents
				SET		';
	$id = $_POST['content_id'];
	/* to avoid including in MySQL query later */
	unset($_POST['content_id']);
	
	$length = count($_POST);
	$count = 0;
	foreach($_POST as $col => $value){
		$value = trim($value);
		$query .= $col."='".escapeString($value);
		// don't add comma after last value to update
		if(++$count != $length){ $query .= "', "; }
		// add space before WHERE clause
		else{ $query .= "'	"; }
	}
	$query .= 'WHERE		id='.$id;
	
	$update_result = $mysqli->query($query);