php probleempje

Gestart doorDaiman4 reacties21 weergaven

5 berichten · pagina 1 van 1

Daiman

Lid · Topicstarter

Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hoi,

ik loop even tegen een klein probleempje met php ik krijg het volgende te zien:

Parse error: syntax error, unexpected T_ELSEIF in C:xampphtdocsestelpay.php on line 17


en dit is de code van regel 16 tot 19

[COLOR= #0000BB]<?php
$getm[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM factuur WHERE id="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"factuur"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getm[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit factuur bestaat niet(meer)!"[/COLOR][COLOR= #007700];
}[/COLOR] 
?>


maar ik kom er zelf niet uit ik zie de fout ook niet.
maar als ik voor $getm // zet dan werkt het weer wel.
en volgensmij klopt mijn query gewoon en de string

wie weet raad?
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
if ipv elseif
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
misschien een andere if of else erboven niet goed afgesloten?
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Waarom doe je eignelijk een else if terwijl je nog geen andere if hebt staan?
0
Daiman

Lid · Topicstarter

Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb wel andere if maar dat klopt gewoon

volledige is nu:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/*
[pay.php]
ColorVPS bestel systeem.
Copyright 2011 Daiman Meijers.
*/[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bmethode"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"factuur"[/COLOR][COLOR= #007700]])) {[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bmethode"[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Geen betaal methode opgegeven!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"factuur"[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Geen factuur id opgegeven!"[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #0000BB]$getm[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM factuur WHERE id="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"factuur"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getm[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit factuur bestaat niet(meer)!"[/COLOR][COLOR= #007700];
}[/COLOR] 
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bmethode"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]1[/COLOR] OR [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bmethode"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]2[/COLOR] OR [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"bmethode"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Foutief betaal methode opgegeven!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{
}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"verkeerde aanroep van deze pagina!"[/COLOR][COLOR= #007700];
}[/COLOR]
?>


edit: opgelost ik moest de string boven die eerste if zetten
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