Thanks for the help.
Object of the program.
file.php has a form and the following code.
names.txt is the file that the will populate with the names entered in the textfield and when a user clicks on submitted.
A person enters their name into a form field and clicks submit. The name is entered into a file called names.txt
Issue. The file.php program works.
The form displays in the browser and the test 'echoes' show in the browser.
BUT the names.txt field does not have any data inside of it even when I enter
a name into the textfield and click submit.
file.php
if (isset($_POST['name'])) {
$name = $_POST['name'];
if (!empty($name)) {
//echo 'okay';
$handle = fopen('names.txt', 'w');
fwrite($handle, $'alex');
fwrite($handle, $'kyle');
fclose($handle);
}else{
echo 'please type a name';
?>
<form input type ="text" name ="file.php" method ="POST" >
Name: <br><input type ="text" name ="name"><br><br>
<input type="submit" name ="submit" value ="Submit">
</form>