notification system php ajax code example

Example 1: how to build jquery messages notification with php and mysq

$sql = "update tbl_noti set status = 'read'";
       $result = $conn->query($sql);
       $row = $result->fetch_assoc();
       $count = $result->num_rows;
       echo $count;
       $conn->close();

Example 2: how to build jquery messages notification with php and mysq

<script type="text/javascript">

$(document).ready(function(){
$("#datacount").load("select.php");
setInterval(function(){
$("#datacount").load('select.php')
}, 20000);
 });

</script>

Tags:

Php Example