Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
edited by

up_vote.php like down_vote.php

//HTML Code

$id = mysql_escape_String($id);
//Verify IP address in Voting_IP table
$ip_sql=mysql_query("select ip_add from Voting_IP where mes_id_fk='$id' and ip_add='$ip'");

// Update Vote.
$sql = "update Messages set up=up+1 where mes_id='$id'";
mysql_query( $sql);
// Insert IP address and Message Id in Voting_IP table.
$sql_in = "insert into Voting_IP (mes_id_fk,ip_add) values ('$id','$ip')";
mysql_query( $sql_in);
echo "<script>alert('Thanks for the vote');</script>";
echo "<script>alert('You have already voted');</script>";

$result=mysql_query("select up from Messages where mes_id='$id'");
echo $up_value;



1 Answer

0 votes
Looks promising - maybe you will release it as a plugin?
Thanks, gidgreen, for fun! ) But I am not an programmer, I do not know how to do that.
edited by
I am about voting. If somebody wants to create plugin for anonymous voting, I suggest it must be with preventing abuse with email notification. For example. If someone anonymous cliks up voting bottom, then popping up field, there this anonymous user must enter email, then this user entered his email account end validate his voting. ReCaptcha from google is not practical and a bit difficult to guess words
Sorry, it is easy to abuse. I have red that to prevent spam it must have limitation per time ( I am thinking 5 in 1 hour).