Apache2 web application- Submit button - write data into a file

Hello,

I am newbie on php-mysql and just know only installation.
I have an apache2+php5+mysql installed VPS.
What I would like to do is that when visitor enters requested data shown in index.html, submit button will run a script to save each field into a file.

Here is an example shown in /var/www/html/index.html :

name: 
surname:
email:
phone:

Button name is "submit"
Filename that data will be inserted is "entry"
its path : /var/data/entry

Normally I can do such a thing with bash script but when it comes to html application, I do not have experience.

Your help will be highly appreciated.

Thanks
Boris

Normally web developers use PHP for web applications because there are many "superglobal" variables in PHP which are not present in bash or other shell scripts.

See: PHP Superglobals to learn more about the rich array of super global variables available in PHP.

1 Like