Ik heb een probleempje met een script. Ik wil deze script invoegen in klikmissies voor mijn niewe game.
Maar de punten gaan nu ergens anders ik wil dat ze naar mijn game gaan.
Deze script hieronder is als iemand je een punt geeft zeg maar.
Hoe kan ik nou voor zorgen dat mijn leden die punten krijgen dus dat hij naar "deal_leden" gaat. En dat hun saldo omhoog gaat.
<?$date = date("Ymd");
$query = "SELECT * FROM klikmissies WHERE actief = 1";
$result = mysql_query($query) or die(mysql_error());
while($object = mysql_fetch_object($result)){
$result2 = mysql_query("SELECT * FROM kmkliks WHERE user = ".$_SESSION[users]." AND banner = $object->naam AND date = $date");
if(mysql_num_rows($result2) == 0){
echo"<a href="klik_km.php?banner=$object->naam" onclick="setTimeout(document.location=document.location;,1000);" target="_blank"><img src="$object->banner" width="468" height="60" border="0"></a><br>
Geplant: $object->maximaal - Geklikt: $object->nu <br><br>";
}
}
?> Maar de punten gaan nu ergens anders ik wil dat ze naar mijn game gaan.
Deze script hieronder is als iemand je een punt geeft zeg maar.
[COLOR= #0000BB]<?
$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$date[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Ymd"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$giveu[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO kopers (ip, date, user) VALUES ($ip, $date, $giveu)"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/print"]print[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM kopers WHERE ip = $ip AND date = $date AND user = $giveu"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cgold[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"1"[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `deal_leden` SET saldo=saldo+2 WHERE `user` = $_GET[user] and game = $game"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Succesvol twee punten gegeven!"[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `deal_leden` SET saldo=saldo+1 WHERE `user` = $_GET[user] and game = $game"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Succesvol een punt gegeven!"[/COLOR][COLOR= #007700];
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Vandaag al een punt gegeven!"[/COLOR][COLOR= #007700];
}[/COLOR]
?> Hoe kan ik nou voor zorgen dat mijn leden die punten krijgen dus dat hij naar "deal_leden" gaat. En dat hun saldo omhoog gaat.
