Below is a script through which I am trying to send two parameters: 'badge' and 'srnum' to name2.php.
$('input.accept').on('click',function(){
var badge= $(this).attr('id');
var srnum = $(this).attr('name');
//alert(badge+""+srnum);
$.post('name2.php',{badge:badge,srnum:srnum},function(data){
$('td#status').text(data);
});
});
name2.php -:
<?php
$badge = $_POST['badge'];
$srnum = $_POST['srnum'];;
$connection = oci_connect("","","");
$main_query=oci_parse($connection,"UPDATE LEAVEINFO1 SET LEAD='Approved' WHERE BADGE='$badge' AND SRNUM='$srnum'");
oci_execute($main_query);
oci_close($connection);
?>
Now, here I am not able to post 2 variables using the ajax script to name2.php. Any help as to how should I post 2 or more variables and receive them in the corresponding name2.php script.