PHP Basics In Pictures
  1. Create a new script with this code:

    <?php

    $myfile = fopen ($filename, 'w') or die("Can not open file");

    $outputFile = �$comments\n\n�;

    fputs($myfile, $outputFile);

    fclose($myfile);

    print "<p>The $filename file is created with the following thought:</p>";

    print "<p>$comments</p>";

    print "<p><a href=\"textwriter.html\">Enter a new thought</a></p>\n";

    print "<p><a href=\"$filename\">View the $filename text file</a></p>\n";

    ?>