wp_version = '3.8';
works perfect in local host
but when i upload on host it won't work,
include the file into a " wordpress page " //include'view.php'
BUT when I open the single view.php file on server it works !
this code for like and dislikes buttons, you can see buttons
my site link
when i click the button it not working on host ! but works in local host
--------------------------------------------------
<script>
function rate(rating){ //'rating' VARIABLE FROM THE FORM in view.php
var data = 'rating='+rating+'&p_id=<?php echo $p_id; ?>&uid=<?php echo $u_id?>&aid=<?php echo $author_id; ?>';
$.ajax({
type: 'POST',
url: 'rate.php', //POSTS FORM TO THIS FILE
data: data,
success: function(e){
$("#ratings").html(e); //REPLACES THE TEXT OF view.php
}
});
}
</script>
<style>
/*GIVES THE POINTER TO THE BUTTONS ON MOUSEOVER*/
#like, #dislike {
cursor: pointer;
}
</style>