I was trying to create a web form that would accept the data from the user and store it in a text file.For this I have installed LAMP server and I have written the code in PHP. Now the problem is that the target file is not getting created. I googled it on different websites. Once such link says that  your connection (HTTP) doesn't have permission to change the text fileI used the following linkhttp://www.webdeveloper.com/forum/showthread.php?74465-Can-PHP-write-variable-content-to-text-filesI am also posting the code that I have written. I am sure that my code is correct. I suspect that the fact the file is not getting created is something to do with the configuration of LAMP server. Can anyone help me on this.here are the codesconfirm_send.php<?phpecho your data has been successfully sent\nNow printing the last name;$Fname = $_POST['first_name'];$Lname = $_POST['last_name'];echo $Lname;$file = 'people.txt';file_put_contents($file, $Fname);?>myform.php<html><head><title>Text Input Control</title></head><body><form action=confirm_send.php method=post>First name:  <input type=text name=first_name /><br>Last name:  <input type=text name=last_name /><input type=submit value=submit name=submit></form></body></html>
Allow HTTP to create a file in LAMP server
php