Hi,
This is the code I use.
$p = rand(1,2);
if ($p == 1) { $b = 2; }
else if ($p == 2) { $b = 1; }
echo"<form method=post action=klik.php><input type=\"submit\" name=\"$p\" value=\"Klik\"></form>";
if(isset($_POST["$p"])){
mysql_query("UPDATE `members` SET `klik`=`klik`+1 WHERE member_id='$idid'");
$br = rand(1,10);
}
if(isset($_POST["$b"])){
mysql_query("UPDATE `members` SET `klik`=`klik`-5 WHERE member_id='$idid'");
}
I don't know why but this won't work
I want people to click it and I want that they get 1 klik so not the minus 5, and when they refresh it could be possible to get the minus 5 because it sends the same..
Can anyone help me with this, or is there maybe something better?
I just want to keep peepz from refreshing