var data={
userName: $('#userName').val(),
email: $('#email').val(),
//add other properties similarly
}
and
$.ajax({
type: "POST",
url: "http://rt.ja.com/includes/register.php?submit=1",
data: data
success: function(html)
{
//alert(html);
$('#userError').html(html);
$("#userError").html(userChar);
$("#userError").html(userTaken);
}
});
You dont have to bother about anything else. jquery will handle the serialization etc. also you can append the submit query string parameter submit=1 into the data json object.