The PHP is a server-side language for the web applications. The applications written with this language are located inside a directory that the web server shares on the network.
This language is useful to make dynamic the web pages of a website. Through this language you can process data, taken from other files, or from a database, and then return this data as HTML code that the client’s browser will elaborate to return a formatted page and with a graphical style. To summarize, the client will request a PHP page, and it will receive from the server an HTML page.
To send data to the server
The two methods to send data between client and server are:
- GET: where the data is visible into the URL. Therefore, this method isn’t safe to send data as passwords or personal informations. With this method you can’t send binary data, as files.
- POST: the data isn’t visible into the URL, you can send binary data, and is a safer method for the transitted data.