Updating Database From Javascript By Calling Php Script
Ive been trying to get this for age I am building a website which has an activity wall. I have the whole thing working except the like and unlike buttons. I have them currently jus
Solution 1:
try this
<scripttype="text/javascript">functionprocess(LikeId) {
//your validation code
$.ajax( {
type: 'POST',
url: LikeUnlike.php, //file where like unlike status change in databasedata:{like:LikeId},
success: function(data) {
//code you want to do after successfull process
}
} );
}
</script>
make changes in html
<ahref='Javascript:void(0)'onclick='process(1)'>Like</a><ahref='Javascript:void(0)'onclick='process(0)'>Unlike</a>
Post a Comment for "Updating Database From Javascript By Calling Php Script"