HTML
<input type='button' class='btn btn-success update' value='Update' name='update' >
JavaScript
$(document).ready(function(){
var id;
var car_Name;
var updateThis="update";
$(".update").on('click', function () {
$.post("process.php",{id:$(".car_name").attr('rel'),car_name:$(".car_name").val(),updateThis:updateThis},function(data){
alert(data);
});
});
});
PHP
if(isset($_POST['updateThis']))
{
echo $_POST['id']." ".$_POST['car_name'];
}
I'm sending data to "process.php" page. I ca not understand about 3rd data "updateThis:updateThis" without this it can not show data.