Horje
how to get data from db using ajax Code Example
how to get data from db using ajax
<script>
    $(function(){
        $(".like").click(function(){

            var postid = $(this).attr("id");
              $.ajax({
                type:'POST',
                url:'addlike.php',
                data:'id='+postid,
                success:function(data){
                   if(data=="you already liked this post"){
                       alert(data);
                     }
                   else{
                      $('a#'+postid).html(data);
                      }
                }
            });

        });
    });

</script>




Javascript

Related
javascript convert file to array Code Example javascript convert file to array Code Example
how to use secondary color in material ui useStyle Code Example how to use secondary color in material ui useStyle Code Example
how to get a particular line from a file in nodejs Code Example how to get a particular line from a file in nodejs Code Example
make react project Code Example make react project Code Example
creating react app using npx Code Example creating react app using npx Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6