I've been creating a form to submit values using AJAX and PHP. but every time the value sent the return value of AJAX = 0. i figured it out the problem he page was refreshed.
AJAX
var xhttp = new XMLHttpRequest();
xhttp.open(//code to the php);
xhttp.setRequestHeader("content-type", "application/...");
xhttp.open(data);
In this case I dont want to use jQuery. I want to finish this with Javascript or PHP.