I use
if(isset($_POST['category_drop'])){
var_dump($_POST );
echo $_POST['category_drop'];
} {...} to check for the post condition in PHP.
Kindly provide me a solution.
$('.category_filter .dropdown-menu li a ').on('click', function(e) {
e.preventDefault();
var category = $(this).text();
$.ajax({
type: "POST",
url: 'page_author.php',
data: {
category_drop: category
},
success: function(data) {
// do something;
alert(category);
}
});
});
I am getting this below value in an alert box , but my page is not getting loaded with the respective value,
array(1) { ["category_drop"]=> string(12) "Accomodation" }
Accomodation