I have set method type as post but in Save.php I just get values either in $_GET or $_REQUEST but not in $_POST.
$.ajax({
method: "post"
, url: "save.php"
, data: "id=453&action=test"
, beforeSend: function(){
}
, complete: function(){
}
, success: function(html){
$("#mydiv").append(html);
}
});
My form looks like:
<form method="post" id="myform" action="save.php">
It was not working, looked around here and on Google, tried adding enctype
<form method="post" id="myform" action="save.php" enctype="application/x-www-form-urlencoded">
but still $_POST empty
How do I make it work?