Jump to content
MakeWebGames

Recommended Posts

Posted

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? :\

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...