I am sending some form data via ajax to a php script in the same page. PHP must process the data and show results in the same page.
I am using this syntax for ajax:<
That is expected behavior. Move your PHP processing to a different page.
$.ajax ({ type: "POST", url: "anotherphppage.php", data: $("form").serialize(), success: function(result) { updatechart(result); } });
Try this and you'll see what I mean:
Try this: