Generally, PHP is used to add a functionality to your website that HTML alone can not reach. But what does this really mean? Give me some examples!!
PHP can preform computations – PHP can preform all kinds of calculations. From figuring out what day it is, or what day of the week March 18, 2046 is, to preforming all different types of mathematical equations.
PHP can collect user information – By this I mean, you can let your user directly interact with the script. This can be something really simple, like gathering the temperature from the user that they want to convert from amounts to another format, or it can be more extensive info, like adding their information to an address book, or letting them post on a newsgroup.
PHP can interact with MySQL databases – And in doing this, the possibilities are endless. You can write users advice to the database and you can recover information from the database. This permits you to create pages on the fly using the contents of the database. You may also do more complicated things like setting up a login system, creating a website search feature, or keep your shop’s merchandise catalog and stock online.
PHP and GD Library can create graphics – You may use PHP to create easy images on the fly. You could also use it to edit existing images. You might need to do this to resize images, rotate them, or greyscale them. Some practical applications for this are allowing users to edit their avatars or creating CAPTCHA verifications. You may also create dynamic graphics that are constantly transforming, my favourite example being dynamic twitter signatures.
This list of what PHP can do could go on for pages and pages, but if you are new to PHP, hopeful this offers you a taste of the kind of things this dynamic language can bring to your web site. Need to learn? Begin with the beginners tutorial!