our approach
|
new tutorials
|
contact us
PHP Basics In Pictures
Basics
Variables
Numbers
User functions
Logic & Loops
Files
Create a new script with this code:
<?php
$myfile = fopen ($filename, 'a') or die("Can not open file");
$outputFile = "$comments\n";
fputs($myfile,$outputFile);
fclose($myfile);
print "<p>The $filename file is updated!</p>";
print "<a href=\"$filename\">View the $filename text file</a>\n";
?>
<< BACK
NEXT >>