Using incenitive voting on topwebgames.com; link used: "http://www.topwebgames.com/in.asp?id=5081&myId=$userid&alwaysreward=1";
users can validate the vote, it'll say success, than refresh.
My code for rewarding below:
<?
$userid=$_GET['myId'];
print "user: $userid
";
require "mysql.php";
require "global_func.php";
global $c;
print "connection: $c
";
$q=mysql_query("SELECT * FROM votes WHERE userid=$userid AND list='twg'",$c);
if(mysql_num_rows($q))
{
die("already voted
");
}
else
{
mysql_query("INSERT INTO votes values ($userid,'twg')",$c);
mysql_query("UPDATE users SET money=money+100 WHERE userid=$userid",$c);
event_add($userid, "Your vote at TWG was successful, you have been credited $100.", $c);
print "vote: complete
";
}
?>
Any ideas? :\