I want the user's input to be written to a new line on a text file on my server.
Thats it.
The two files I have for this right now are new.php:
<?php
echo '<form action="post.php" method="POST"><input type="text" value="Type Fact Here" name="frmPost" size="50" maxlength="100"><input type="submit" name="submit" value="Submit"></form>';
?>
and post.php:
<?php
$writetext .=$frmPost;
$handle = fopen("quotes.txt", "a");
$rhandle = fopen("quotes.txt", "r");
if(!fwrite($handle, $writetext)){
echo "Unable to write your fact";
fclose($handle);
exit;
}
fclose($handle);
header("Location: index.php");
?>
I know I want to change the modes to something different, but I don't know what. I lay myself at the mercy of the forums, thanks for any help you can give me.