The problem isn't with the php nor posting to the database. It's what I have to do to post to the database.
It works with this code:
DOESNT work with this code:Code:$("#sub").click( function() { $.ajax({ type: "POST", url: "userInfo.php", data: $("#myForm").serializeArray(), success: function(data){ alert("Win"); } }); alert("Your data has been saved!"); });
Any reasons why that's happening?Code:$("#sub").click( function() { $.ajax({ type: "POST", url: "userInfo.php", data: $("#myForm").serializeArray(), success: function(data){ alert("Win"); } }); //alert("Your data has been saved!"); });



Reply With Quote

Bookmarks