php uitleg nodig.

Gestart doorJurre9 reacties44 weergaven

10 berichten · pagina 1 van 1

Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hallo,

ok dit is mn script:

ik.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
?>
Hoi [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?><br/><br/>
De Punten zijn gegeven aan: [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]];[/COLOR] ?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]].;[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>


als ik nu naar ik.php ga dan krijg ik de volgende error:

Parse error: syntax error, unexpected T_VARIABLE in ootik.php on line 10


Ok wat doe ik verkeert? en hoe fix ik het?

Vraag 2
Ik haalde regel 10 weg, en ik ging naar ik.php?parameter[1]=jurre

Op regel 8 heb ik op het einde dat hij de waarde van ?parameter[1] moet weergeven, maar dat doet hij ook niet, waar zit daar de fout?

Iemand die me kan helpen?

MVG Jurre
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
?>
Hoi [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?><br/><br/>
De Punten zijn gegeven aan: [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]];[/COLOR] ?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Xjessex schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
?>
Hoi [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?><br/><br/>
De Punten zijn gegeven aan: [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]];[/COLOR] ?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
Ok nu krijg ik geen errors meer, alleen er zit een probleen in $_get. Zodra ik bij mn get waarde [1] gebruik dan werkt hij niet meer. Weet iemand hoe ik het aan de praat krijg met get waarde parameter[1] ?
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
gewoon parameter1 zonder de [ en ]
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@kyron als dat zou kunnen zou ik dat doen, alleen molie gebruikt parameter[1] en parameter[2] dus om de get waarde te krijgen moet ik ook parameter[1] en [2] gebruiken
0
Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br/><br/>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De Punten zijn gegeven aan:[/COLOR][COLOR= #007700];[/COLOR]  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter[1]"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>


ik heb je code even iets netter gemaakt.
0
Berichten
6.722
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Smiegles schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br/><br/>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De Punten zijn gegeven aan:[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
ik heb je code even iets netter gemaakt.

Dit gaat echt niet werken. emo Ik heb jouw post even verbeterd. wink
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wiitse schreef:
Eerdere citaten tonen
Smiegles schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br/><br/>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De Punten zijn gegeven aan:[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
ik heb je code even iets netter gemaakt.
Dit gaat echt niet werken. emo Ik heb jouw post even verbeterd. wink
Bedankt iedereen voor het verbeteren/netter maken alleen ik heb nog wel 1 probleem de get waarde is parameter[1] maar ook bij die van wiitse als ik daar parameter[1] doe werkt het nog niet. Dus hoe moet het met GET parameter[1] ??
0
Berichten
6.722
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jurre schreef:
Eerdere citaten tonen
Wiitse schreef:
Eerdere citaten tonen
Smiegles schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/_include.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]include/header.php[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br/><br/>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De Punten zijn gegeven aan:[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]];[/COLOR] 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET kliks=kliks+2000 WHERE user="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"parameter1"[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
ik heb je code even iets netter gemaakt.
Dit gaat echt niet werken. emo Ik heb jouw post even verbeterd. wink
Bedankt iedereen voor het verbeteren/netter maken alleen ik heb nog wel 1 probleem de get waarde is parameter[1] maar ook bij die van wiitse als ik daar parameter[1] doe werkt het nog niet. Dus hoe moet het met GET parameter[1] ??

Zoals al eerder is gezegd: In GET werkt [] niet. Je moet het dus zonder [] doen!
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het kan dus wel!

De oplossing

echo De Punten zijn gegeven aan: . $_GET[parameter][1];
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