Updating text files using php
The script that accepts the form data from "create_contact.html" will be used to create the text file "mydata.txt" and write the data into the file as a series of text strings.
It should be obvious that this should only be used if you're making one write, if you are writing multiple times to the same file you should handle it yourself with fopen and fwrite, the fclose when you are done writing.When the user makes changes to the data and clicks on the "Save changes" button, the amended details are passed to the "save_contact_details.php" script, which writes the new details back to the "mydata.txt" file.Create the script as shown below, and save it as "edit_contact_details.php".* more info: @return bool TRUE file created succesfully FALSE failed to create file.*/ I had some troubles using file_put_contents with an absolute but no canonicalized path (eg.