This is because checking the database gives an error or isn't configurated correctly.
An example (not relevant because i don't know how gtl vote works precisely)
When you vote on the website the database table will be set from 0 to 1
Your project(server) wil check in the database if it's 0 or 1,
than it's easy to complete with an if else statement.
This will be more complex in your code, but this is the basic syntax
my suggestion is: try learning from it and start writting it from scratch.
This wil boost your coding skills alot !