If we create a website that uses dynamic web pages, these pages are processed by the server before being sent to the browser.
A page .php contains PHP code that when generated will generate HTML code. In that code execution process, queries can be made to databases or other files. In addition, calculations or decisions can be made thanks to the power of programming.
The final result is that the HTML code is sent to the browser, which is generated for each particular visitor depending for example on the content of the database at that moment or on the configuration options or specific requests of the user. Other people may obtain different results if they access at a time when the database has changed or if they have configuration options or make a different request.
How to recognize if a website we visit is PHP dynamic website or static? In general, it is dynamic that can interact with the visitor and/or web administrator, being able to modify the content of the page according to the time or options chosen.
Dynamic web pages advantages
Dynamic web pages offer many advantages compared to static web pages, such as greater interactivity with the user and ease of change and updating content. To the people who manage web pages (webmasters, programmers, content managers), dynamic programming allows them a reduction in time and costs, as well as greater ease in maintaining a website.
Dynamic website example is: when the user can write a comment, choose the products and put them in a shopping cart, upload files or photographs, etc. In this case, IF databases are used and dynamic web programming is required.