using FOPEN
Posted: Mon May 11, 2009 8:42 am
Hello
I am writing a script that writes form input to a text file.
I get this error:
Parse error: syntax error, unexpected T_VARIABLE in d:\hshome\c239198\local54memberforum.com\submitcomment.php on line 8
And I am using this code:
Does anyone see any errors?
I am writing a script that writes form input to a text file.
I get this error:
Parse error: syntax error, unexpected T_VARIABLE in d:\hshome\c239198\local54memberforum.com\submitcomment.php on line 8
And I am using this code:
Code: Select all
<html>
<head>
<title>Local 54 Member Forum</title>
<?php
$name=$_POST['name'];
$comment = $_POST['comment'];
$output = $name."\t".$comment
$fp = fopen("d:\hshome\c239198\local54memberforum.com\comment.txt", 'ab');
flock($fp, LOCK_EX);
if (!$fp) {
echo <p><strong> Your order could not be processed at this time.</strong></p>;
exit;
}
fwrite($fp, $output, strlen($output));
flock($fp, LOCK_UN);
fclose($fp);
echo <p>Submitted</p>
?>
</body>
</html>