How to receive post with ajax
Send post to test.php in the same hierarchy and accept the result in html variable
$.ajax( { type: "POST", url: "test.php", data: {'test': test, 'name': 0, 'asdf': 'asdf'}, success: function(html) { alert(html); } });
In the php of the recipient, specify it as follows
<?php echo "come here"; echo $_POST['test']; ?>
The directory structure looks something like this
$ tree
.
├── a.php
└── test.php