Upvote / Downvote

if($upvote != "")  { //i dont know where you get this value from 

change this line to

if(isset($_GET['upvote'])&&$_GET['upvote']!=""){
    $upvote=$_GET['upvote'];
        //your code to update upvote
        }
       if(isset($_GET['downvote'])&&$_GET['downvote']!=""){
$downvote=$_GET['downvote];
        //here is your code to update downvote
        }

Leave a Comment