Hallo,
Ik ben bezig met PHP leren ( sinds kort )
En ik heb nu deze code:
Nu krijg ik alleen de error: Parse error: syntax error, unexpected ; in /home/borisss/domains/borisss.s3.one2xs.com/public_html/index.php on line 5
alleen volgens mij hoort die ; gewoon achter [guess]
Snapt iemand wat de fout is?
Mvg, Boris
Ik ben bezig met PHP leren ( sinds kort )
En ik heb nu deze code:
[COLOR= #0000BB]<?php[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]posted[/COLOR][COLOR= #007700]]))
([/COLOR]
[COLOR= #0000BB]$user_guess[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]guess[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$number[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user_guess[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]$number[/COLOR][COLOR= #007700])
([/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h1> Te hoog nummer... Het nummer is $number</h1><br/>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"please try again;"[/COLOR][COLOR= #007700];
)[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user_guess[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]$number[/COLOR][COLOR= #007700])
([/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h1>Te laag nummer, het nummer is: $number</h1>"[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"please try again"[/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]""[/COLOR][COLOR= #007700]<[/COLOR]h1[COLOR= #007700]>[/COLOR]Je hebt gewonnen[COLOR= #007700]!<[/COLOR]/h1[COLOR= #007700]>
)[/COLOR]
?> Nu krijg ik alleen de error: Parse error: syntax error, unexpected ; in /home/borisss/domains/borisss.s3.one2xs.com/public_html/index.php on line 5
alleen volgens mij hoort die ; gewoon achter [guess]
Snapt iemand wat de fout is?
Mvg, Boris
