Code of my main page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Salão de Beleza – Madame Nora</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="classes/jquery-2.1.1.js" ></script>
<script type="text/javascript" src="classes/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("#btnDesativar").click(function(event) {
var aux = confirm('Deseja Realmente Desativar Conta?');
if(aux == true){
var acao = "1";
var url = "includes/conexaoIndex.php";
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttp.send("acao="+acao);
}
});
});
</script>
</head>
<?php include "/includes/conexaoIndex.php"; ?>
<body>
<form id="loginUsuario" name="loginUsuario" action="" >
<button type="submit" id="btnDesativar" name="btnDesativar" >Desativar conta</button>
</form>
</body>
</html>
And on my other page, I only have this to test:
<?php
if (isset($_POST['acao']))
{
echo "aqui";}
?>
In my browser it looks like this:
http://localhost/Projeto/teste.php?btnDesativar=
Why does not it work?