sfekt` Posted April 30, 2007 Share Posted April 30, 2007 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? :\ Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 1, 2007 Share Posted May 1, 2007 Re: Neat Little Bug what's that alwaysreward variable? Quote Link to comment Share on other sites More sharing options...
sfekt` Posted May 3, 2007 Author Share Posted May 3, 2007 Re: Neat Little Bug Used to reward when voted and COUNTED, deception, what's your msn? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.