I have a simple code-form like this:

```
$.ajax({
  url: "http://myurl/test.php",
  type: "POST",
  dataType: "html",
  data: {
    action: "login"
  },
  success: function (data) {
    console.log(data)
  }
});

```

When on PHP server page, I try to print `$_POST["action"]` yet this field is blank. Why does it work fine if I use `$.post(url,data,function)`?