My server's mail script has been very unreliable so I want to replace a little script I have running. It's basically a little webform that sends the input to my email.
Instead, I want it to replace the script with a script that updates a little txt file instead of email. ie, I have a form like
Name:
email:
comments:
[sumbit]
and whenver someone fills this out it inserts that much in a txt file
How would I go around doing this? A very simple example will be very nice!
<? // If the form has been submitted ------------------------- if (isset($_POST['Submit'])) { $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments'];
// Disable HTML Code Insert into text file --------------
Copy and past the code above into notepad, and save it as something like "feedback.php". In the same directory, create a blank text file and call it "messages.txt", and CHMOD it to 777 (give it read, write and execute permission to all).
Every message will be added to the text file on a new line, and the name, email and message will be seperated by a " | ".