Here I'm attaching the image of my code. I need to post an id to the same page when I clicking a link, and also need to pop-up a bootstrap model window. I'm worked with several methods. The value is available at console and fire bug inspect. But I could not get the id using $_GET
,$_POST
or $_REQUEST
methods. Any Can you help me?
<td><p data-placement="top" data-toggle="tooltip" title="Edit"><button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal" data-target="#edit" id="edit-button" data-id="26" ><span class="fa fa-pencil"></span></button></p></td>
<script>
$('#edit-button').click(function(){
var eid = $(this).data('id');
$.ajax
({
url: 'managers.php',
data: {"eid": eid},
type: 'post',
success: function(result)
{
console.log(eid);
}
});
});
</script>