Making a simple HTML page is relatively easy nowadays. The only problem is that HTML pages are very limited. To make them more dynamic you can use PHP. PHP is a server-side, scripting language used for the development of web applications.
A powerful feature of PHP is that it can access databases. PHP is able to access more than 20 different databases, including MySQL. It takes the input from an online user (your visitor) and manipulates the information within your database. Then PHP can output anything you want, like dynamic (totally new) web pages, text, images, graphs and charts, PDF files or movies from your site.
If you see a (older) web page that ends in .php, then the website owner has written some PHP code to enhance the HTML. But PHP can also work on your site without showing the.php extension. This is the better solution.
Some well-known sites were build with PHP, like: Facebook, Wikipedia, Flickr, Thumblr and Mailchimp. Although Facebook uses a new PHP-derived language now.
E-commerce is one of the major uses for PHP, but there are many others.