Beste One2xsers,
Ik ben mezelf mbv cursussen en tuturials php aan het leren en probeer nu zelf een gastenboek in elkar te zetten simpel mbv. een .txt bestandje.
Nu heb k deze codegemaakt in een bestand genaamd test4.php:
Maar nu krijg ik de volgende error:
Wat doe ik fout?
Ik ben mezelf mbv cursussen en tuturials php aan het leren en probeer nu zelf een gastenboek in elkar te zetten simpel mbv. een .txt bestandje.
Nu heb k deze codegemaakt in een bestand genaamd test4.php:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<font size="5"><b>Gastenboek</b></font><br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<HR SIZE="1" align=left width=400 NOSHADE>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"gastenboek.txt"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<form action="test4.php" method="get">
Naam:
<input type="text" name="name">
<br>
Text:
<input type="text" name="text">
<br>
<input type="submit" value="Verstuur" name="submit">
<input type="Reset" name="Reset"> </form>
<?[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$name[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$_GET[name]"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$text[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"$_GET[text]"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$file[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fopen"]fopen[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"gastenboek.txt"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"a"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/fputs"]fputs[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$file[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"
<table border=0 width=400 cellpadding=0 cellspacing=0>
<tr><td width=100><b>Schrijver:</b></td><td>$name</td></tr>
<tr><td width=100><b>Datum:</b></td><td>$date</td></tr>
<tr><td colspan=2><b>Text:</b></td></tr>
<tr><td colspan=2>$text</td></tr>
<tr><td colspan=2><HR SIZE="[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #DD0000]" NOSHADE></td></tr>
</table>
"[/COLOR]
[COLOR= #007700]);[/COLOR]
?> Maar nu krijg ik de volgende error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:xampphtdocs est4.php on line 19 Wat doe ik fout?



