Postback

Gestart doorRiick23 reacties40 weergaven

24 berichten · pagina 2 van 2

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Heb je al de query gelogd die wordt uitgevoerd? En wat gebeurt er als je deze in phpMyAdmin uitvoert?

$sql = "SELECT dit,dat FROM tabel WHERE id = ".$id."";
echo $sql;
$result = mysql_query($sql);


Gekeken naar mysql_error()?

We geven in dit topic wel adviezen, maar die er eens wat mee....
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Doe dit eens..

[COLOR= #0000BB]<?php

$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]...[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}[/COLOR]

?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
of nog mooier:

[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]...[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// je query...[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]().[/COLOR][COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Query: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700];
}[/COLOR]

?>
0
Riick

Lid · Topicstarter

Berichten
3.425
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik deed het volgende

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]config.php[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$uid[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]UID[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$award[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]AWARD[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$postback_key[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]572f243a4f3a95b3[/COLOR][COLOR= #007700];[/COLOR]
grid[COLOR= #007700].[/COLOR]
[COLOR= #0000BB]$cmp_vkey[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]mt[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #0000BB]$postback_key[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmp_vkey[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vkey[/COLOR][COLOR= #007700]]){[/COLOR]
[COLOR= #FF8000]// bad vkey, dont credit user and warn admin.[/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 member_accounts SET uCoins = uCoins + $award WHERE uId = $uid"[/COLOR][COLOR= #007700]);
}[/COLOR]

?>

[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]mysql_query("UPDATE member_accounts SET uCoins = uCoins + [/COLOR][COLOR= #0000BB]$award[/COLOR][COLOR= #DD0000] WHERE uId = [/COLOR][COLOR= #0000BB]$uid[/COLOR][COLOR= #DD0000]")[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// je query...[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) {[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]().[/COLOR][COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Query: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700];
}[/COLOR]

?>


En hij zei het volgende:

Parse error: syntax error, unexpected $award (T_VARIABLE) in /home/riick/domains/gamerscash.nl/public_html/tokenads.php on line 5
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Wat doet lijn 8?

Waar slaat lijn 18 en 19 op? Je moet de code integreren, niet toevoegen.
Lijn 19 is volkomen onzin.

Mijn tip:
Gooi dit in de ijskast met een hangslot tot 15 juni, en ga beginnen bij phptuts.nl en verdiep je in een contactformulier, gastenboek, formulierafhandeling etc....
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Zo gaat het idd niet lukken, je kan duidelijk de syntax van PHP nog niet.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Daarom mijn dringende advies (en ook namens de rest) om te stoppen waar je mee bezig bent, en dus bij het begin te beginnen. Je maakt er voor jezelf alleen maar een puinhoop van.
0
Riick

Lid · Topicstarter

Berichten
3.425
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En daarom wil ik ook iemand betalen om het te doen.
Aangezien ik alleen dit kleine stukje script nodig heb, en dan alles af heb.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
En dan als het af is?...dan zit je wéér met een ander probleem? Veel punten heb je ook niet om het uit te besteden.
Je doet er echt beter aan om dit in de ijskast te stoppen...

Begin liever eerst met PHP te leren dan dat je moeilijke sources moet onderhouden.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren