I am attempting to make a simple forum with php. I have 4 parts of my forum, a main php page that displays all the posts so far (working), a html page to put in what you want to post (working), a text document to store posts in (working), and a php page that takes what you put in on the forum post page and puts it into a text document (not working). Here is the php code on that page:
<?php
$myFile = "fourmposts.txt";
$fh = fopen($myFile, 'r');
$oldposts = fread($fh, filesize($myFile));
fclose($fh);
$myFile = "fourmposts.txt";
$fh = fopen($myFile, 'w')
$stringData = "Posted by: " . $POST_[name] . "<br />" . $POST_[thepost] . $oldposts;
fwrite($fh, $stringData);
?>
The error I get on that page is:
Parse error: parse error, unexpected T_VARIABLE in [I]path from the C drive that the file is located at[/I] on line 18[\CODE]
I am using an apache server to test my forum.