Ajax Code我想将我的empid和ownid提交给markread.php以用作$ _POST [' empid'];和$ _POST [' ownid'];
<script>
$(document).ready(function(){
$(".chatlist").click(function(){
var name = $(this).data('fullname');
var empid = $(this).data('employeeid');
var ownid = $('#yourownemployeeid').val();
$.post('chat/markread.php', {empid: empid,ownid: ownid}, function(){
//majority of code here...
});
});
});
</script>
Php Code
<?php
include("../connection.php");
$id = $_GET['empid'];
$id2 = $_GET['ownid'];
mysql_query("UPDATE chat SET notification = 'Seen' WHERE recievernumber = '$id' and senderenumber = '$id2'");
?>