form that saves information entered into a data.txt file php none of them works

29 views Asked by At

i'am looking for form that has index.html and process.php In index you enter Your Name: Your age: (but you dont enter it gives you option from 10 to 50) and you click submit and that information saves in data.txt file on /var/www/html not on client side. I've tried hundred of them none of them works

Also please don't link other forms i've tried hundred of them on stack, on google, look they are all outdated? I'am using Ubuntu 18.04 lts server, with apache2 installed and php, PHP 7.0.33-0+deb9u6 (cli) (built: Oct 24 2019 18:50:20) ( NTS ) Server version: Apache/2.4.25 (Debian) Server built: 2019-10-13T15:43:54

1

There are 1 answers

2
Jamie Carl On BEST ANSWER

Your web server probably does not have write permission on /var/www/html.

Try this very dangerous command that gives everyone write access:

chmod 777 /var/www/html

I will assume you are just testing so opening it up to the world should not be a problem.